Public ListServiceInstances and GetServiceInstance OpenApi.
This commit is contained in:
413
computenestsupplier/src/ComputeNestSupplierClient.cc
Normal file
413
computenestsupplier/src/ComputeNestSupplierClient.cc
Normal file
@@ -0,0 +1,413 @@
|
||||
/*
|
||||
* 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/computenestsupplier/ComputeNestSupplierClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "ComputeNestSupplier";
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ComputeNestSupplierClient(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, "");
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ComputeNestSupplierClient(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, "");
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ComputeNestSupplierClient(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, "");
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::~ComputeNestSupplierClient()
|
||||
{}
|
||||
|
||||
ComputeNestSupplierClient::CreateArtifactOutcome ComputeNestSupplierClient::createArtifact(const CreateArtifactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateArtifactOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateArtifactOutcome(CreateArtifactResult(outcome.result()));
|
||||
else
|
||||
return CreateArtifactOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::createArtifactAsync(const CreateArtifactRequest& request, const CreateArtifactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createArtifact(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::CreateArtifactOutcomeCallable ComputeNestSupplierClient::createArtifactCallable(const CreateArtifactRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateArtifactOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createArtifact(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::DeleteArtifactOutcome ComputeNestSupplierClient::deleteArtifact(const DeleteArtifactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteArtifactOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteArtifactOutcome(DeleteArtifactResult(outcome.result()));
|
||||
else
|
||||
return DeleteArtifactOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::deleteArtifactAsync(const DeleteArtifactRequest& request, const DeleteArtifactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteArtifact(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::DeleteArtifactOutcomeCallable ComputeNestSupplierClient::deleteArtifactCallable(const DeleteArtifactRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteArtifactOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteArtifact(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::GetArtifactOutcome ComputeNestSupplierClient::getArtifact(const GetArtifactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetArtifactOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetArtifactOutcome(GetArtifactResult(outcome.result()));
|
||||
else
|
||||
return GetArtifactOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::getArtifactAsync(const GetArtifactRequest& request, const GetArtifactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getArtifact(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::GetArtifactOutcomeCallable ComputeNestSupplierClient::getArtifactCallable(const GetArtifactRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetArtifactOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getArtifact(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::GetArtifactRepositoryCredentialsOutcome ComputeNestSupplierClient::getArtifactRepositoryCredentials(const GetArtifactRepositoryCredentialsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetArtifactRepositoryCredentialsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetArtifactRepositoryCredentialsOutcome(GetArtifactRepositoryCredentialsResult(outcome.result()));
|
||||
else
|
||||
return GetArtifactRepositoryCredentialsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::getArtifactRepositoryCredentialsAsync(const GetArtifactRepositoryCredentialsRequest& request, const GetArtifactRepositoryCredentialsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getArtifactRepositoryCredentials(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::GetArtifactRepositoryCredentialsOutcomeCallable ComputeNestSupplierClient::getArtifactRepositoryCredentialsCallable(const GetArtifactRepositoryCredentialsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetArtifactRepositoryCredentialsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getArtifactRepositoryCredentials(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::GetServiceInstanceOutcome ComputeNestSupplierClient::getServiceInstance(const GetServiceInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetServiceInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetServiceInstanceOutcome(GetServiceInstanceResult(outcome.result()));
|
||||
else
|
||||
return GetServiceInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::getServiceInstanceAsync(const GetServiceInstanceRequest& request, const GetServiceInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getServiceInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::GetServiceInstanceOutcomeCallable ComputeNestSupplierClient::getServiceInstanceCallable(const GetServiceInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetServiceInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getServiceInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ListArtifactVersionsOutcome ComputeNestSupplierClient::listArtifactVersions(const ListArtifactVersionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListArtifactVersionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListArtifactVersionsOutcome(ListArtifactVersionsResult(outcome.result()));
|
||||
else
|
||||
return ListArtifactVersionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::listArtifactVersionsAsync(const ListArtifactVersionsRequest& request, const ListArtifactVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listArtifactVersions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ListArtifactVersionsOutcomeCallable ComputeNestSupplierClient::listArtifactVersionsCallable(const ListArtifactVersionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListArtifactVersionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listArtifactVersions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ListArtifactsOutcome ComputeNestSupplierClient::listArtifacts(const ListArtifactsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListArtifactsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListArtifactsOutcome(ListArtifactsResult(outcome.result()));
|
||||
else
|
||||
return ListArtifactsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::listArtifactsAsync(const ListArtifactsRequest& request, const ListArtifactsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listArtifacts(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ListArtifactsOutcomeCallable ComputeNestSupplierClient::listArtifactsCallable(const ListArtifactsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListArtifactsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listArtifacts(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ListServiceInstancesOutcome ComputeNestSupplierClient::listServiceInstances(const ListServiceInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServiceInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServiceInstancesOutcome(ListServiceInstancesResult(outcome.result()));
|
||||
else
|
||||
return ListServiceInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::listServiceInstancesAsync(const ListServiceInstancesRequest& request, const ListServiceInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServiceInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ListServiceInstancesOutcomeCallable ComputeNestSupplierClient::listServiceInstancesCallable(const ListServiceInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServiceInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServiceInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ReleaseArtifactOutcome ComputeNestSupplierClient::releaseArtifact(const ReleaseArtifactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReleaseArtifactOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReleaseArtifactOutcome(ReleaseArtifactResult(outcome.result()));
|
||||
else
|
||||
return ReleaseArtifactOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::releaseArtifactAsync(const ReleaseArtifactRequest& request, const ReleaseArtifactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, releaseArtifact(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::ReleaseArtifactOutcomeCallable ComputeNestSupplierClient::releaseArtifactCallable(const ReleaseArtifactRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReleaseArtifactOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->releaseArtifact(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::UpdateArtifactOutcome ComputeNestSupplierClient::updateArtifact(const UpdateArtifactRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateArtifactOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateArtifactOutcome(UpdateArtifactResult(outcome.result()));
|
||||
else
|
||||
return UpdateArtifactOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestSupplierClient::updateArtifactAsync(const UpdateArtifactRequest& request, const UpdateArtifactAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateArtifact(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestSupplierClient::UpdateArtifactOutcomeCallable ComputeNestSupplierClient::updateArtifactCallable(const UpdateArtifactRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateArtifactOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateArtifact(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
89
computenestsupplier/src/model/CreateArtifactRequest.cc
Normal file
89
computenestsupplier/src/model/CreateArtifactRequest.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/CreateArtifactRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::CreateArtifactRequest;
|
||||
|
||||
CreateArtifactRequest::CreateArtifactRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "CreateArtifact") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateArtifactRequest::~CreateArtifactRequest() {}
|
||||
|
||||
std::string CreateArtifactRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateArtifactRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateArtifactRequest::getSupportRegionIds() const {
|
||||
return supportRegionIds_;
|
||||
}
|
||||
|
||||
void CreateArtifactRequest::setSupportRegionIds(const std::vector<std::string> &supportRegionIds) {
|
||||
supportRegionIds_ = supportRegionIds;
|
||||
}
|
||||
|
||||
std::string CreateArtifactRequest::getArtifactType() const {
|
||||
return artifactType_;
|
||||
}
|
||||
|
||||
void CreateArtifactRequest::setArtifactType(const std::string &artifactType) {
|
||||
artifactType_ = artifactType;
|
||||
setParameter(std::string("ArtifactType"), artifactType);
|
||||
}
|
||||
|
||||
std::string CreateArtifactRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreateArtifactRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string CreateArtifactRequest::getArtifactId() const {
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
void CreateArtifactRequest::setArtifactId(const std::string &artifactId) {
|
||||
artifactId_ = artifactId;
|
||||
setParameter(std::string("ArtifactId"), artifactId);
|
||||
}
|
||||
|
||||
std::string CreateArtifactRequest::getArtifactProperty() const {
|
||||
return artifactProperty_;
|
||||
}
|
||||
|
||||
void CreateArtifactRequest::setArtifactProperty(const std::string &artifactProperty) {
|
||||
artifactProperty_ = artifactProperty;
|
||||
setParameter(std::string("ArtifactProperty"), artifactProperty);
|
||||
}
|
||||
|
||||
std::string CreateArtifactRequest::getVersionName() const {
|
||||
return versionName_;
|
||||
}
|
||||
|
||||
void CreateArtifactRequest::setVersionName(const std::string &versionName) {
|
||||
versionName_ = versionName;
|
||||
setParameter(std::string("VersionName"), versionName);
|
||||
}
|
||||
|
||||
121
computenestsupplier/src/model/CreateArtifactResult.cc
Normal file
121
computenestsupplier/src/model/CreateArtifactResult.cc
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/CreateArtifactResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
CreateArtifactResult::CreateArtifactResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateArtifactResult::CreateArtifactResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateArtifactResult::~CreateArtifactResult()
|
||||
{}
|
||||
|
||||
void CreateArtifactResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ArtifactId"].isNull())
|
||||
artifactId_ = value["ArtifactId"].asString();
|
||||
if(!value["ArtifactType"].isNull())
|
||||
artifactType_ = value["ArtifactType"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["VersionName"].isNull())
|
||||
versionName_ = value["VersionName"].asString();
|
||||
if(!value["ArtifactVersion"].isNull())
|
||||
artifactVersion_ = value["ArtifactVersion"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
description_ = value["Description"].asString();
|
||||
if(!value["GmtModified"].isNull())
|
||||
gmtModified_ = value["GmtModified"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["MaxVersion"].isNull())
|
||||
maxVersion_ = std::stol(value["MaxVersion"].asString());
|
||||
if(!value["ArtifactProperty"].isNull())
|
||||
artifactProperty_ = value["ArtifactProperty"].asString();
|
||||
if(!value["SupportRegionIds"].isNull())
|
||||
supportRegionIds_ = value["SupportRegionIds"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getArtifactVersion()const
|
||||
{
|
||||
return artifactVersion_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getArtifactId()const
|
||||
{
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getArtifactType()const
|
||||
{
|
||||
return artifactType_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getSupportRegionIds()const
|
||||
{
|
||||
return supportRegionIds_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getGmtModified()const
|
||||
{
|
||||
return gmtModified_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getVersionName()const
|
||||
{
|
||||
return versionName_;
|
||||
}
|
||||
|
||||
long CreateArtifactResult::getMaxVersion()const
|
||||
{
|
||||
return maxVersion_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getArtifactProperty()const
|
||||
{
|
||||
return artifactProperty_;
|
||||
}
|
||||
|
||||
std::string CreateArtifactResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
45
computenestsupplier/src/model/DeleteArtifactRequest.cc
Normal file
45
computenestsupplier/src/model/DeleteArtifactRequest.cc
Normal 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/computenestsupplier/model/DeleteArtifactRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::DeleteArtifactRequest;
|
||||
|
||||
DeleteArtifactRequest::DeleteArtifactRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "DeleteArtifact") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteArtifactRequest::~DeleteArtifactRequest() {}
|
||||
|
||||
std::string DeleteArtifactRequest::getArtifactVersion() const {
|
||||
return artifactVersion_;
|
||||
}
|
||||
|
||||
void DeleteArtifactRequest::setArtifactVersion(const std::string &artifactVersion) {
|
||||
artifactVersion_ = artifactVersion;
|
||||
setParameter(std::string("ArtifactVersion"), artifactVersion);
|
||||
}
|
||||
|
||||
std::string DeleteArtifactRequest::getArtifactId() const {
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
void DeleteArtifactRequest::setArtifactId(const std::string &artifactId) {
|
||||
artifactId_ = artifactId;
|
||||
setParameter(std::string("ArtifactId"), artifactId);
|
||||
}
|
||||
|
||||
44
computenestsupplier/src/model/DeleteArtifactResult.cc
Normal file
44
computenestsupplier/src/model/DeleteArtifactResult.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/computenestsupplier/model/DeleteArtifactResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
DeleteArtifactResult::DeleteArtifactResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteArtifactResult::DeleteArtifactResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteArtifactResult::~DeleteArtifactResult()
|
||||
{}
|
||||
|
||||
void DeleteArtifactResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -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/computenestsupplier/model/GetArtifactRepositoryCredentialsRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::GetArtifactRepositoryCredentialsRequest;
|
||||
|
||||
GetArtifactRepositoryCredentialsRequest::GetArtifactRepositoryCredentialsRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "GetArtifactRepositoryCredentials") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetArtifactRepositoryCredentialsRequest::~GetArtifactRepositoryCredentialsRequest() {}
|
||||
|
||||
std::string GetArtifactRepositoryCredentialsRequest::getDeployRegionId() const {
|
||||
return deployRegionId_;
|
||||
}
|
||||
|
||||
void GetArtifactRepositoryCredentialsRequest::setDeployRegionId(const std::string &deployRegionId) {
|
||||
deployRegionId_ = deployRegionId;
|
||||
setParameter(std::string("DeployRegionId"), deployRegionId);
|
||||
}
|
||||
|
||||
std::string GetArtifactRepositoryCredentialsRequest::getArtifactType() const {
|
||||
return artifactType_;
|
||||
}
|
||||
|
||||
void GetArtifactRepositoryCredentialsRequest::setArtifactType(const std::string &artifactType) {
|
||||
artifactType_ = artifactType;
|
||||
setParameter(std::string("ArtifactType"), artifactType);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/GetArtifactRepositoryCredentialsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
GetArtifactRepositoryCredentialsResult::GetArtifactRepositoryCredentialsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetArtifactRepositoryCredentialsResult::GetArtifactRepositoryCredentialsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetArtifactRepositoryCredentialsResult::~GetArtifactRepositoryCredentialsResult()
|
||||
{}
|
||||
|
||||
void GetArtifactRepositoryCredentialsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAvailableResourcesNode = value["AvailableResources"]["availableResourcesItem"];
|
||||
for (auto valueAvailableResourcesavailableResourcesItem : allAvailableResourcesNode)
|
||||
{
|
||||
AvailableResourcesItem availableResourcesObject;
|
||||
if(!valueAvailableResourcesavailableResourcesItem["RegionId"].isNull())
|
||||
availableResourcesObject.regionId = valueAvailableResourcesavailableResourcesItem["RegionId"].asString();
|
||||
if(!valueAvailableResourcesavailableResourcesItem["RepositoryName"].isNull())
|
||||
availableResourcesObject.repositoryName = valueAvailableResourcesavailableResourcesItem["RepositoryName"].asString();
|
||||
if(!valueAvailableResourcesavailableResourcesItem["Path"].isNull())
|
||||
availableResourcesObject.path = valueAvailableResourcesavailableResourcesItem["Path"].asString();
|
||||
availableResources_.push_back(availableResourcesObject);
|
||||
}
|
||||
auto credentialsNode = value["Credentials"];
|
||||
if(!credentialsNode["Username"].isNull())
|
||||
credentials_.username = credentialsNode["Username"].asString();
|
||||
if(!credentialsNode["Password"].isNull())
|
||||
credentials_.password = credentialsNode["Password"].asString();
|
||||
if(!credentialsNode["AccessKeyId"].isNull())
|
||||
credentials_.accessKeyId = credentialsNode["AccessKeyId"].asString();
|
||||
if(!credentialsNode["AccessKeySecret"].isNull())
|
||||
credentials_.accessKeySecret = credentialsNode["AccessKeySecret"].asString();
|
||||
if(!credentialsNode["SecurityToken"].isNull())
|
||||
credentials_.securityToken = credentialsNode["SecurityToken"].asString();
|
||||
if(!value["ExpireDate"].isNull())
|
||||
expireDate_ = value["ExpireDate"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetArtifactRepositoryCredentialsResult::getExpireDate()const
|
||||
{
|
||||
return expireDate_;
|
||||
}
|
||||
|
||||
std::vector<GetArtifactRepositoryCredentialsResult::AvailableResourcesItem> GetArtifactRepositoryCredentialsResult::getAvailableResources()const
|
||||
{
|
||||
return availableResources_;
|
||||
}
|
||||
|
||||
GetArtifactRepositoryCredentialsResult::Credentials GetArtifactRepositoryCredentialsResult::getCredentials()const
|
||||
{
|
||||
return credentials_;
|
||||
}
|
||||
|
||||
45
computenestsupplier/src/model/GetArtifactRequest.cc
Normal file
45
computenestsupplier/src/model/GetArtifactRequest.cc
Normal 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/computenestsupplier/model/GetArtifactRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::GetArtifactRequest;
|
||||
|
||||
GetArtifactRequest::GetArtifactRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "GetArtifact") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetArtifactRequest::~GetArtifactRequest() {}
|
||||
|
||||
std::string GetArtifactRequest::getArtifactVersion() const {
|
||||
return artifactVersion_;
|
||||
}
|
||||
|
||||
void GetArtifactRequest::setArtifactVersion(const std::string &artifactVersion) {
|
||||
artifactVersion_ = artifactVersion;
|
||||
setParameter(std::string("ArtifactVersion"), artifactVersion);
|
||||
}
|
||||
|
||||
std::string GetArtifactRequest::getArtifactId() const {
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
void GetArtifactRequest::setArtifactId(const std::string &artifactId) {
|
||||
artifactId_ = artifactId;
|
||||
setParameter(std::string("ArtifactId"), artifactId);
|
||||
}
|
||||
|
||||
128
computenestsupplier/src/model/GetArtifactResult.cc
Normal file
128
computenestsupplier/src/model/GetArtifactResult.cc
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/GetArtifactResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
GetArtifactResult::GetArtifactResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetArtifactResult::GetArtifactResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetArtifactResult::~GetArtifactResult()
|
||||
{}
|
||||
|
||||
void GetArtifactResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ArtifactId"].isNull())
|
||||
artifactId_ = value["ArtifactId"].asString();
|
||||
if(!value["ArtifactType"].isNull())
|
||||
artifactType_ = value["ArtifactType"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["VersionName"].isNull())
|
||||
versionName_ = value["VersionName"].asString();
|
||||
if(!value["ArtifactVersion"].isNull())
|
||||
artifactVersion_ = value["ArtifactVersion"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
description_ = value["Description"].asString();
|
||||
if(!value["GmtModified"].isNull())
|
||||
gmtModified_ = value["GmtModified"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["MaxVersion"].isNull())
|
||||
maxVersion_ = std::stol(value["MaxVersion"].asString());
|
||||
if(!value["ArtifactProperty"].isNull())
|
||||
artifactProperty_ = value["ArtifactProperty"].asString();
|
||||
if(!value["SupportRegionIds"].isNull())
|
||||
supportRegionIds_ = value["SupportRegionIds"].asString();
|
||||
if(!value["Progress"].isNull())
|
||||
progress_ = value["Progress"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getProgress()const
|
||||
{
|
||||
return progress_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getArtifactVersion()const
|
||||
{
|
||||
return artifactVersion_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getArtifactId()const
|
||||
{
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getArtifactType()const
|
||||
{
|
||||
return artifactType_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getSupportRegionIds()const
|
||||
{
|
||||
return supportRegionIds_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getGmtModified()const
|
||||
{
|
||||
return gmtModified_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getVersionName()const
|
||||
{
|
||||
return versionName_;
|
||||
}
|
||||
|
||||
long GetArtifactResult::getMaxVersion()const
|
||||
{
|
||||
return maxVersion_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getArtifactProperty()const
|
||||
{
|
||||
return artifactProperty_;
|
||||
}
|
||||
|
||||
std::string GetArtifactResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
45
computenestsupplier/src/model/GetServiceInstanceRequest.cc
Normal file
45
computenestsupplier/src/model/GetServiceInstanceRequest.cc
Normal 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/computenestsupplier/model/GetServiceInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::GetServiceInstanceRequest;
|
||||
|
||||
GetServiceInstanceRequest::GetServiceInstanceRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "GetServiceInstance") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetServiceInstanceRequest::~GetServiceInstanceRequest() {}
|
||||
|
||||
std::string GetServiceInstanceRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetServiceInstanceRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceRequest::getServiceInstanceId() const {
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
void GetServiceInstanceRequest::setServiceInstanceId(const std::string &serviceInstanceId) {
|
||||
serviceInstanceId_ = serviceInstanceId;
|
||||
setParameter(std::string("ServiceInstanceId"), serviceInstanceId);
|
||||
}
|
||||
|
||||
294
computenestsupplier/src/model/GetServiceInstanceResult.cc
Normal file
294
computenestsupplier/src/model/GetServiceInstanceResult.cc
Normal file
@@ -0,0 +1,294 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/GetServiceInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
GetServiceInstanceResult::GetServiceInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetServiceInstanceResult::GetServiceInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetServiceInstanceResult::~GetServiceInstanceResult()
|
||||
{}
|
||||
|
||||
void GetServiceInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagsNode = value["Tags"]["Tag"];
|
||||
for (auto valueTagsTag : allTagsNode)
|
||||
{
|
||||
Tag tagsObject;
|
||||
if(!valueTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueTagsTag["Key"].asString();
|
||||
if(!valueTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueTagsTag["Value"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
auto serviceNode = value["Service"];
|
||||
if(!serviceNode["Status"].isNull())
|
||||
service_.status = serviceNode["Status"].asString();
|
||||
if(!serviceNode["PublishTime"].isNull())
|
||||
service_.publishTime = serviceNode["PublishTime"].asString();
|
||||
if(!serviceNode["Version"].isNull())
|
||||
service_.version = serviceNode["Version"].asString();
|
||||
if(!serviceNode["DeployMetadata"].isNull())
|
||||
service_.deployMetadata = serviceNode["DeployMetadata"].asString();
|
||||
if(!serviceNode["DeployType"].isNull())
|
||||
service_.deployType = serviceNode["DeployType"].asString();
|
||||
if(!serviceNode["ServiceId"].isNull())
|
||||
service_.serviceId = serviceNode["ServiceId"].asString();
|
||||
if(!serviceNode["SupplierUrl"].isNull())
|
||||
service_.supplierUrl = serviceNode["SupplierUrl"].asString();
|
||||
if(!serviceNode["ServiceProductUrl"].isNull())
|
||||
service_.serviceProductUrl = serviceNode["ServiceProductUrl"].asString();
|
||||
if(!serviceNode["ServiceDocUrl"].isNull())
|
||||
service_.serviceDocUrl = serviceNode["ServiceDocUrl"].asString();
|
||||
if(!serviceNode["ServiceType"].isNull())
|
||||
service_.serviceType = serviceNode["ServiceType"].asString();
|
||||
if(!serviceNode["SupplierName"].isNull())
|
||||
service_.supplierName = serviceNode["SupplierName"].asString();
|
||||
if(!serviceNode["VersionName"].isNull())
|
||||
service_.versionName = serviceNode["VersionName"].asString();
|
||||
auto allServiceInfosNode = serviceNode["ServiceInfos"]["ServiceInfo"];
|
||||
for (auto serviceNodeServiceInfosServiceInfo : allServiceInfosNode)
|
||||
{
|
||||
Service::ServiceInfo serviceInfoObject;
|
||||
if(!serviceNodeServiceInfosServiceInfo["Locale"].isNull())
|
||||
serviceInfoObject.locale = serviceNodeServiceInfosServiceInfo["Locale"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Image"].isNull())
|
||||
serviceInfoObject.image = serviceNodeServiceInfosServiceInfo["Image"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Name"].isNull())
|
||||
serviceInfoObject.name = serviceNodeServiceInfosServiceInfo["Name"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["ShortDescription"].isNull())
|
||||
serviceInfoObject.shortDescription = serviceNodeServiceInfosServiceInfo["ShortDescription"].asString();
|
||||
service_.serviceInfos.push_back(serviceInfoObject);
|
||||
}
|
||||
auto networkConfigNode = value["NetworkConfig"];
|
||||
if(!networkConfigNode["EndpointServiceId"].isNull())
|
||||
networkConfig_.endpointServiceId = networkConfigNode["EndpointServiceId"].asString();
|
||||
if(!networkConfigNode["EndpointId"].isNull())
|
||||
networkConfig_.endpointId = networkConfigNode["EndpointId"].asString();
|
||||
auto allPrivateVpcConnectionsNode = networkConfigNode["PrivateVpcConnections"]["PrivateVpcConnection"];
|
||||
for (auto networkConfigNodePrivateVpcConnectionsPrivateVpcConnection : allPrivateVpcConnectionsNode)
|
||||
{
|
||||
NetworkConfig::PrivateVpcConnection privateVpcConnectionObject;
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointId"].isNull())
|
||||
privateVpcConnectionObject.endpointId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointId"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointServiceId"].isNull())
|
||||
privateVpcConnectionObject.endpointServiceId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointServiceId"].asString();
|
||||
networkConfig_.privateVpcConnections.push_back(privateVpcConnectionObject);
|
||||
}
|
||||
auto allReversePrivateVpcConnectionsNode = networkConfigNode["ReversePrivateVpcConnections"]["ReversePrivateVpcConnection"];
|
||||
for (auto networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection : allReversePrivateVpcConnectionsNode)
|
||||
{
|
||||
NetworkConfig::ReversePrivateVpcConnection reversePrivateVpcConnectionObject;
|
||||
if(!networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection["EndpointId"].isNull())
|
||||
reversePrivateVpcConnectionObject.endpointId = networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection["EndpointId"].asString();
|
||||
if(!networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection["EndpointServiceId"].isNull())
|
||||
reversePrivateVpcConnectionObject.endpointServiceId = networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection["EndpointServiceId"].asString();
|
||||
networkConfig_.reversePrivateVpcConnections.push_back(reversePrivateVpcConnectionObject);
|
||||
}
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["TemplateName"].isNull())
|
||||
templateName_ = value["TemplateName"].asString();
|
||||
if(!value["UpdateTime"].isNull())
|
||||
updateTime_ = value["UpdateTime"].asString();
|
||||
if(!value["ServiceInstanceId"].isNull())
|
||||
serviceInstanceId_ = value["ServiceInstanceId"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["UserId"].isNull())
|
||||
userId_ = std::stol(value["UserId"].asString());
|
||||
if(!value["SupplierUid"].isNull())
|
||||
supplierUid_ = std::stol(value["SupplierUid"].asString());
|
||||
if(!value["Parameters"].isNull())
|
||||
parameters_ = value["Parameters"].asString();
|
||||
if(!value["Progress"].isNull())
|
||||
progress_ = std::stol(value["Progress"].asString());
|
||||
if(!value["StatusDetail"].isNull())
|
||||
statusDetail_ = value["StatusDetail"].asString();
|
||||
if(!value["OperationStartTime"].isNull())
|
||||
operationStartTime_ = value["OperationStartTime"].asString();
|
||||
if(!value["OperationEndTime"].isNull())
|
||||
operationEndTime_ = value["OperationEndTime"].asString();
|
||||
if(!value["OperatedServiceInstanceId"].isNull())
|
||||
operatedServiceInstanceId_ = value["OperatedServiceInstanceId"].asString();
|
||||
if(!value["IsOperated"].isNull())
|
||||
isOperated_ = value["IsOperated"].asString() == "true";
|
||||
if(!value["EnableInstanceOps"].isNull())
|
||||
enableInstanceOps_ = value["EnableInstanceOps"].asString() == "true";
|
||||
if(!value["Resources"].isNull())
|
||||
resources_ = value["Resources"].asString();
|
||||
if(!value["Outputs"].isNull())
|
||||
outputs_ = value["Outputs"].asString();
|
||||
if(!value["EndTime"].isNull())
|
||||
endTime_ = value["EndTime"].asString();
|
||||
if(!value["Source"].isNull())
|
||||
source_ = value["Source"].asString();
|
||||
if(!value["ServiceType"].isNull())
|
||||
serviceType_ = value["ServiceType"].asString();
|
||||
if(!value["PayType"].isNull())
|
||||
payType_ = value["PayType"].asString();
|
||||
if(!value["LicenseMetadata"].isNull())
|
||||
licenseMetadata_ = value["LicenseMetadata"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOperatedServiceInstanceId()const
|
||||
{
|
||||
return operatedServiceInstanceId_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOperationEndTime()const
|
||||
{
|
||||
return operationEndTime_;
|
||||
}
|
||||
|
||||
bool GetServiceInstanceResult::getEnableInstanceOps()const
|
||||
{
|
||||
return enableInstanceOps_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getSource()const
|
||||
{
|
||||
return source_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOperationStartTime()const
|
||||
{
|
||||
return operationStartTime_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getServiceInstanceId()const
|
||||
{
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getServiceType()const
|
||||
{
|
||||
return serviceType_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getLicenseMetadata()const
|
||||
{
|
||||
return licenseMetadata_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getTemplateName()const
|
||||
{
|
||||
return templateName_;
|
||||
}
|
||||
|
||||
std::vector<GetServiceInstanceResult::Tag> GetServiceInstanceResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
long GetServiceInstanceResult::getProgress()const
|
||||
{
|
||||
return progress_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getParameters()const
|
||||
{
|
||||
return parameters_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
GetServiceInstanceResult::NetworkConfig GetServiceInstanceResult::getNetworkConfig()const
|
||||
{
|
||||
return networkConfig_;
|
||||
}
|
||||
|
||||
GetServiceInstanceResult::Service GetServiceInstanceResult::getService()const
|
||||
{
|
||||
return service_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getPayType()const
|
||||
{
|
||||
return payType_;
|
||||
}
|
||||
|
||||
long GetServiceInstanceResult::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getStatusDetail()const
|
||||
{
|
||||
return statusDetail_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getUpdateTime()const
|
||||
{
|
||||
return updateTime_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOutputs()const
|
||||
{
|
||||
return outputs_;
|
||||
}
|
||||
|
||||
long GetServiceInstanceResult::getSupplierUid()const
|
||||
{
|
||||
return supplierUid_;
|
||||
}
|
||||
|
||||
bool GetServiceInstanceResult::getIsOperated()const
|
||||
{
|
||||
return isOperated_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getResources()const
|
||||
{
|
||||
return resources_;
|
||||
}
|
||||
|
||||
54
computenestsupplier/src/model/ListArtifactVersionsRequest.cc
Normal file
54
computenestsupplier/src/model/ListArtifactVersionsRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/computenestsupplier/model/ListArtifactVersionsRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::ListArtifactVersionsRequest;
|
||||
|
||||
ListArtifactVersionsRequest::ListArtifactVersionsRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "ListArtifactVersions") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListArtifactVersionsRequest::~ListArtifactVersionsRequest() {}
|
||||
|
||||
std::string ListArtifactVersionsRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListArtifactVersionsRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::string ListArtifactVersionsRequest::getMaxResult() const {
|
||||
return maxResult_;
|
||||
}
|
||||
|
||||
void ListArtifactVersionsRequest::setMaxResult(const std::string &maxResult) {
|
||||
maxResult_ = maxResult;
|
||||
setParameter(std::string("MaxResult"), maxResult);
|
||||
}
|
||||
|
||||
std::string ListArtifactVersionsRequest::getArtifactId() const {
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
void ListArtifactVersionsRequest::setArtifactId(const std::string &artifactId) {
|
||||
artifactId_ = artifactId;
|
||||
setParameter(std::string("ArtifactId"), artifactId);
|
||||
}
|
||||
|
||||
102
computenestsupplier/src/model/ListArtifactVersionsResult.cc
Normal file
102
computenestsupplier/src/model/ListArtifactVersionsResult.cc
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/computenestsupplier/model/ListArtifactVersionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
ListArtifactVersionsResult::ListArtifactVersionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListArtifactVersionsResult::ListArtifactVersionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListArtifactVersionsResult::~ListArtifactVersionsResult()
|
||||
{}
|
||||
|
||||
void ListArtifactVersionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allArtifactsNode = value["Artifacts"]["Artifact"];
|
||||
for (auto valueArtifactsArtifact : allArtifactsNode)
|
||||
{
|
||||
Artifact artifactsObject;
|
||||
if(!valueArtifactsArtifact["ArtifactId"].isNull())
|
||||
artifactsObject.artifactId = valueArtifactsArtifact["ArtifactId"].asString();
|
||||
if(!valueArtifactsArtifact["ArtifactType"].isNull())
|
||||
artifactsObject.artifactType = valueArtifactsArtifact["ArtifactType"].asString();
|
||||
if(!valueArtifactsArtifact["VersionName"].isNull())
|
||||
artifactsObject.versionName = valueArtifactsArtifact["VersionName"].asString();
|
||||
if(!valueArtifactsArtifact["ArtifactVersion"].isNull())
|
||||
artifactsObject.artifactVersion = valueArtifactsArtifact["ArtifactVersion"].asString();
|
||||
if(!valueArtifactsArtifact["Status"].isNull())
|
||||
artifactsObject.status = valueArtifactsArtifact["Status"].asString();
|
||||
if(!valueArtifactsArtifact["ArtifactProperty"].isNull())
|
||||
artifactsObject.artifactProperty = valueArtifactsArtifact["ArtifactProperty"].asString();
|
||||
if(!valueArtifactsArtifact["SupportRegionIds"].isNull())
|
||||
artifactsObject.supportRegionIds = valueArtifactsArtifact["SupportRegionIds"].asString();
|
||||
if(!valueArtifactsArtifact["GmtModified"].isNull())
|
||||
artifactsObject.gmtModified = valueArtifactsArtifact["GmtModified"].asString();
|
||||
if(!valueArtifactsArtifact["Progress"].isNull())
|
||||
artifactsObject.progress = valueArtifactsArtifact["Progress"].asString();
|
||||
if(!valueArtifactsArtifact["GmtCreate"].isNull())
|
||||
artifactsObject.gmtCreate = valueArtifactsArtifact["GmtCreate"].asString();
|
||||
if(!valueArtifactsArtifact["ImageDelivery"].isNull())
|
||||
artifactsObject.imageDelivery = valueArtifactsArtifact["ImageDelivery"].asString();
|
||||
if(!valueArtifactsArtifact["SecurityAuditResult"].isNull())
|
||||
artifactsObject.securityAuditResult = valueArtifactsArtifact["SecurityAuditResult"].asString();
|
||||
if(!valueArtifactsArtifact["ResultFile"].isNull())
|
||||
artifactsObject.resultFile = valueArtifactsArtifact["ResultFile"].asString();
|
||||
artifacts_.push_back(artifactsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = value["TotalCount"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListArtifactVersionsResult::Artifact> ListArtifactVersionsResult::getArtifacts()const
|
||||
{
|
||||
return artifacts_;
|
||||
}
|
||||
|
||||
std::string ListArtifactVersionsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string ListArtifactVersionsResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::string ListArtifactVersionsResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
58
computenestsupplier/src/model/ListArtifactsRequest.cc
Normal file
58
computenestsupplier/src/model/ListArtifactsRequest.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/ListArtifactsRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::ListArtifactsRequest;
|
||||
|
||||
ListArtifactsRequest::ListArtifactsRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "ListArtifacts") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListArtifactsRequest::~ListArtifactsRequest() {}
|
||||
|
||||
std::string ListArtifactsRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListArtifactsRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListArtifactsRequest::Filter> ListArtifactsRequest::getFilter() const {
|
||||
return filter_;
|
||||
}
|
||||
|
||||
void ListArtifactsRequest::setFilter(const std::vector<ListArtifactsRequest::Filter> &filter) {
|
||||
filter_ = filter;
|
||||
for(int dep1 = 0; dep1 != filter.size(); dep1++) {
|
||||
auto filterObj = filter.at(dep1);
|
||||
std::string filterObjStr = std::string("Filter") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(filterObjStr + ".Name", filterObj.name);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListArtifactsRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListArtifactsRequest::setMaxResults(const std::string &maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setParameter(std::string("MaxResults"), maxResults);
|
||||
}
|
||||
|
||||
90
computenestsupplier/src/model/ListArtifactsResult.cc
Normal file
90
computenestsupplier/src/model/ListArtifactsResult.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/computenestsupplier/model/ListArtifactsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
ListArtifactsResult::ListArtifactsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListArtifactsResult::ListArtifactsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListArtifactsResult::~ListArtifactsResult()
|
||||
{}
|
||||
|
||||
void ListArtifactsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allArtifactsNode = value["Artifacts"]["Artifact"];
|
||||
for (auto valueArtifactsArtifact : allArtifactsNode)
|
||||
{
|
||||
Artifact artifactsObject;
|
||||
if(!valueArtifactsArtifact["ArtifactId"].isNull())
|
||||
artifactsObject.artifactId = valueArtifactsArtifact["ArtifactId"].asString();
|
||||
if(!valueArtifactsArtifact["ArtifactType"].isNull())
|
||||
artifactsObject.artifactType = valueArtifactsArtifact["ArtifactType"].asString();
|
||||
if(!valueArtifactsArtifact["Name"].isNull())
|
||||
artifactsObject.name = valueArtifactsArtifact["Name"].asString();
|
||||
if(!valueArtifactsArtifact["MaxVersion"].isNull())
|
||||
artifactsObject.maxVersion = valueArtifactsArtifact["MaxVersion"].asString();
|
||||
if(!valueArtifactsArtifact["Description"].isNull())
|
||||
artifactsObject.description = valueArtifactsArtifact["Description"].asString();
|
||||
if(!valueArtifactsArtifact["GmtModified"].isNull())
|
||||
artifactsObject.gmtModified = valueArtifactsArtifact["GmtModified"].asString();
|
||||
if(!valueArtifactsArtifact["Status"].isNull())
|
||||
artifactsObject.status = valueArtifactsArtifact["Status"].asString();
|
||||
artifacts_.push_back(artifactsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = value["TotalCount"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListArtifactsResult::Artifact> ListArtifactsResult::getArtifacts()const
|
||||
{
|
||||
return artifacts_;
|
||||
}
|
||||
|
||||
std::string ListArtifactsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string ListArtifactsResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::string ListArtifactsResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
81
computenestsupplier/src/model/ListServiceInstancesRequest.cc
Normal file
81
computenestsupplier/src/model/ListServiceInstancesRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/ListServiceInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::ListServiceInstancesRequest;
|
||||
|
||||
ListServiceInstancesRequest::ListServiceInstancesRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "ListServiceInstances") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListServiceInstancesRequest::~ListServiceInstancesRequest() {}
|
||||
|
||||
std::string ListServiceInstancesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstancesRequest::Tag> ListServiceInstancesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setTag(const std::vector<ListServiceInstancesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstancesRequest::Filter> ListServiceInstancesRequest::getFilter() const {
|
||||
return filter_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setFilter(const std::vector<ListServiceInstancesRequest::Filter> &filter) {
|
||||
filter_ = filter;
|
||||
for(int dep1 = 0; dep1 != filter.size(); dep1++) {
|
||||
auto filterObj = filter.at(dep1);
|
||||
std::string filterObjStr = std::string("Filter") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(filterObjStr + ".Name", filterObj.name);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setMaxResults(const std::string &maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setParameter(std::string("MaxResults"), maxResults);
|
||||
}
|
||||
|
||||
157
computenestsupplier/src/model/ListServiceInstancesResult.cc
Normal file
157
computenestsupplier/src/model/ListServiceInstancesResult.cc
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/ListServiceInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
ListServiceInstancesResult::ListServiceInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServiceInstancesResult::ListServiceInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServiceInstancesResult::~ListServiceInstancesResult()
|
||||
{}
|
||||
|
||||
void ListServiceInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allServiceInstancesNode = value["ServiceInstances"]["ServiceInstance"];
|
||||
for (auto valueServiceInstancesServiceInstance : allServiceInstancesNode)
|
||||
{
|
||||
ServiceInstance serviceInstancesObject;
|
||||
if(!valueServiceInstancesServiceInstance["Status"].isNull())
|
||||
serviceInstancesObject.status = valueServiceInstancesServiceInstance["Status"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["UpdateTime"].isNull())
|
||||
serviceInstancesObject.updateTime = valueServiceInstancesServiceInstance["UpdateTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["Name"].isNull())
|
||||
serviceInstancesObject.name = valueServiceInstancesServiceInstance["Name"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["ServiceInstanceId"].isNull())
|
||||
serviceInstancesObject.serviceInstanceId = valueServiceInstancesServiceInstance["ServiceInstanceId"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["CreateTime"].isNull())
|
||||
serviceInstancesObject.createTime = valueServiceInstancesServiceInstance["CreateTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["UserId"].isNull())
|
||||
serviceInstancesObject.userId = std::stol(valueServiceInstancesServiceInstance["UserId"].asString());
|
||||
if(!valueServiceInstancesServiceInstance["Parameters"].isNull())
|
||||
serviceInstancesObject.parameters = valueServiceInstancesServiceInstance["Parameters"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["Progress"].isNull())
|
||||
serviceInstancesObject.progress = std::stol(valueServiceInstancesServiceInstance["Progress"].asString());
|
||||
if(!valueServiceInstancesServiceInstance["StatusDetail"].isNull())
|
||||
serviceInstancesObject.statusDetail = valueServiceInstancesServiceInstance["StatusDetail"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["TemplateName"].isNull())
|
||||
serviceInstancesObject.templateName = valueServiceInstancesServiceInstance["TemplateName"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["OperatedServiceInstanceId"].isNull())
|
||||
serviceInstancesObject.operatedServiceInstanceId = valueServiceInstancesServiceInstance["OperatedServiceInstanceId"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["OperationStartTime"].isNull())
|
||||
serviceInstancesObject.operationStartTime = valueServiceInstancesServiceInstance["OperationStartTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["OperationEndTime"].isNull())
|
||||
serviceInstancesObject.operationEndTime = valueServiceInstancesServiceInstance["OperationEndTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["EnableInstanceOps"].isNull())
|
||||
serviceInstancesObject.enableInstanceOps = valueServiceInstancesServiceInstance["EnableInstanceOps"].asString() == "true";
|
||||
if(!valueServiceInstancesServiceInstance["Source"].isNull())
|
||||
serviceInstancesObject.source = valueServiceInstancesServiceInstance["Source"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["EndTime"].isNull())
|
||||
serviceInstancesObject.endTime = valueServiceInstancesServiceInstance["EndTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["ServiceType"].isNull())
|
||||
serviceInstancesObject.serviceType = valueServiceInstancesServiceInstance["ServiceType"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["PayType"].isNull())
|
||||
serviceInstancesObject.payType = valueServiceInstancesServiceInstance["PayType"].asString();
|
||||
auto allTagsNode = valueServiceInstancesServiceInstance["Tags"]["Tag"];
|
||||
for (auto valueServiceInstancesServiceInstanceTagsTag : allTagsNode)
|
||||
{
|
||||
ServiceInstance::Tag tagsObject;
|
||||
if(!valueServiceInstancesServiceInstanceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueServiceInstancesServiceInstanceTagsTag["Key"].asString();
|
||||
if(!valueServiceInstancesServiceInstanceTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueServiceInstancesServiceInstanceTagsTag["Value"].asString();
|
||||
serviceInstancesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto serviceNode = value["Service"];
|
||||
if(!serviceNode["Status"].isNull())
|
||||
serviceInstancesObject.service.status = serviceNode["Status"].asString();
|
||||
if(!serviceNode["PublishTime"].isNull())
|
||||
serviceInstancesObject.service.publishTime = serviceNode["PublishTime"].asString();
|
||||
if(!serviceNode["Version"].isNull())
|
||||
serviceInstancesObject.service.version = serviceNode["Version"].asString();
|
||||
if(!serviceNode["DeployType"].isNull())
|
||||
serviceInstancesObject.service.deployType = serviceNode["DeployType"].asString();
|
||||
if(!serviceNode["ServiceId"].isNull())
|
||||
serviceInstancesObject.service.serviceId = serviceNode["ServiceId"].asString();
|
||||
if(!serviceNode["SupplierUrl"].isNull())
|
||||
serviceInstancesObject.service.supplierUrl = serviceNode["SupplierUrl"].asString();
|
||||
if(!serviceNode["ServiceType"].isNull())
|
||||
serviceInstancesObject.service.serviceType = serviceNode["ServiceType"].asString();
|
||||
if(!serviceNode["SupplierName"].isNull())
|
||||
serviceInstancesObject.service.supplierName = serviceNode["SupplierName"].asString();
|
||||
if(!serviceNode["VersionName"].isNull())
|
||||
serviceInstancesObject.service.versionName = serviceNode["VersionName"].asString();
|
||||
if(!serviceNode["DeployMetadata"].isNull())
|
||||
serviceInstancesObject.service.deployMetadata = serviceNode["DeployMetadata"].asString();
|
||||
auto allServiceInfosNode = serviceNode["ServiceInfos"]["ServiceInfo"];
|
||||
for (auto serviceNodeServiceInfosServiceInfo : allServiceInfosNode)
|
||||
{
|
||||
ServiceInstance::Service::ServiceInfo serviceInfoObject;
|
||||
if(!serviceNodeServiceInfosServiceInfo["Locale"].isNull())
|
||||
serviceInfoObject.locale = serviceNodeServiceInfosServiceInfo["Locale"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Image"].isNull())
|
||||
serviceInfoObject.image = serviceNodeServiceInfosServiceInfo["Image"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Name"].isNull())
|
||||
serviceInfoObject.name = serviceNodeServiceInfosServiceInfo["Name"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["ShortDescription"].isNull())
|
||||
serviceInfoObject.shortDescription = serviceNodeServiceInfosServiceInfo["ShortDescription"].asString();
|
||||
serviceInstancesObject.service.serviceInfos.push_back(serviceInfoObject);
|
||||
}
|
||||
serviceInstances_.push_back(serviceInstancesObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
|
||||
}
|
||||
|
||||
int ListServiceInstancesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstancesResult::ServiceInstance> ListServiceInstancesResult::getServiceInstances()const
|
||||
{
|
||||
return serviceInstances_;
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
36
computenestsupplier/src/model/ReleaseArtifactRequest.cc
Normal file
36
computenestsupplier/src/model/ReleaseArtifactRequest.cc
Normal 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/computenestsupplier/model/ReleaseArtifactRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::ReleaseArtifactRequest;
|
||||
|
||||
ReleaseArtifactRequest::ReleaseArtifactRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "ReleaseArtifact") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ReleaseArtifactRequest::~ReleaseArtifactRequest() {}
|
||||
|
||||
std::string ReleaseArtifactRequest::getArtifactId() const {
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
void ReleaseArtifactRequest::setArtifactId(const std::string &artifactId) {
|
||||
artifactId_ = artifactId;
|
||||
setParameter(std::string("ArtifactId"), artifactId);
|
||||
}
|
||||
|
||||
100
computenestsupplier/src/model/ReleaseArtifactResult.cc
Normal file
100
computenestsupplier/src/model/ReleaseArtifactResult.cc
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/ReleaseArtifactResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
ReleaseArtifactResult::ReleaseArtifactResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReleaseArtifactResult::ReleaseArtifactResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReleaseArtifactResult::~ReleaseArtifactResult()
|
||||
{}
|
||||
|
||||
void ReleaseArtifactResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ArtifactId"].isNull())
|
||||
artifactId_ = value["ArtifactId"].asString();
|
||||
if(!value["ArtifactType"].isNull())
|
||||
artifactType_ = value["ArtifactType"].asString();
|
||||
if(!value["VersionName"].isNull())
|
||||
versionName_ = value["VersionName"].asString();
|
||||
if(!value["ArtifactVersion"].isNull())
|
||||
artifactVersion_ = value["ArtifactVersion"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
description_ = value["Description"].asString();
|
||||
if(!value["GmtModified"].isNull())
|
||||
gmtModified_ = value["GmtModified"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["ArtifactProperty"].isNull())
|
||||
artifactProperty_ = value["ArtifactProperty"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getArtifactVersion()const
|
||||
{
|
||||
return artifactVersion_;
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getArtifactId()const
|
||||
{
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getArtifactType()const
|
||||
{
|
||||
return artifactType_;
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getGmtModified()const
|
||||
{
|
||||
return gmtModified_;
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getVersionName()const
|
||||
{
|
||||
return versionName_;
|
||||
}
|
||||
|
||||
std::string ReleaseArtifactResult::getArtifactProperty()const
|
||||
{
|
||||
return artifactProperty_;
|
||||
}
|
||||
|
||||
71
computenestsupplier/src/model/UpdateArtifactRequest.cc
Normal file
71
computenestsupplier/src/model/UpdateArtifactRequest.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/computenestsupplier/model/UpdateArtifactRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNestSupplier::Model::UpdateArtifactRequest;
|
||||
|
||||
UpdateArtifactRequest::UpdateArtifactRequest()
|
||||
: RpcServiceRequest("computenestsupplier", "2021-05-21", "UpdateArtifact") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateArtifactRequest::~UpdateArtifactRequest() {}
|
||||
|
||||
std::string UpdateArtifactRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void UpdateArtifactRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::vector<std::string> UpdateArtifactRequest::getSupportRegionIds() const {
|
||||
return supportRegionIds_;
|
||||
}
|
||||
|
||||
void UpdateArtifactRequest::setSupportRegionIds(const std::vector<std::string> &supportRegionIds) {
|
||||
supportRegionIds_ = supportRegionIds;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactRequest::getArtifactId() const {
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
void UpdateArtifactRequest::setArtifactId(const std::string &artifactId) {
|
||||
artifactId_ = artifactId;
|
||||
setParameter(std::string("ArtifactId"), artifactId);
|
||||
}
|
||||
|
||||
std::string UpdateArtifactRequest::getArtifactProperty() const {
|
||||
return artifactProperty_;
|
||||
}
|
||||
|
||||
void UpdateArtifactRequest::setArtifactProperty(const std::string &artifactProperty) {
|
||||
artifactProperty_ = artifactProperty;
|
||||
setParameter(std::string("ArtifactProperty"), artifactProperty);
|
||||
}
|
||||
|
||||
std::string UpdateArtifactRequest::getVersionName() const {
|
||||
return versionName_;
|
||||
}
|
||||
|
||||
void UpdateArtifactRequest::setVersionName(const std::string &versionName) {
|
||||
versionName_ = versionName;
|
||||
setParameter(std::string("VersionName"), versionName);
|
||||
}
|
||||
|
||||
107
computenestsupplier/src/model/UpdateArtifactResult.cc
Normal file
107
computenestsupplier/src/model/UpdateArtifactResult.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/computenestsupplier/model/UpdateArtifactResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNestSupplier;
|
||||
using namespace AlibabaCloud::ComputeNestSupplier::Model;
|
||||
|
||||
UpdateArtifactResult::UpdateArtifactResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateArtifactResult::UpdateArtifactResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateArtifactResult::~UpdateArtifactResult()
|
||||
{}
|
||||
|
||||
void UpdateArtifactResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ArtifactId"].isNull())
|
||||
artifactId_ = value["ArtifactId"].asString();
|
||||
if(!value["ArtifactType"].isNull())
|
||||
artifactType_ = value["ArtifactType"].asString();
|
||||
if(!value["VersionName"].isNull())
|
||||
versionName_ = value["VersionName"].asString();
|
||||
if(!value["ArtifactVersion"].isNull())
|
||||
artifactVersion_ = value["ArtifactVersion"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
description_ = value["Description"].asString();
|
||||
if(!value["GmtModified"].isNull())
|
||||
gmtModified_ = value["GmtModified"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["ArtifactProperty"].isNull())
|
||||
artifactProperty_ = value["ArtifactProperty"].asString();
|
||||
if(!value["SupportRegionIds"].isNull())
|
||||
supportRegionIds_ = value["SupportRegionIds"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getArtifactVersion()const
|
||||
{
|
||||
return artifactVersion_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getArtifactId()const
|
||||
{
|
||||
return artifactId_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getArtifactType()const
|
||||
{
|
||||
return artifactType_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getSupportRegionIds()const
|
||||
{
|
||||
return supportRegionIds_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getGmtModified()const
|
||||
{
|
||||
return gmtModified_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getVersionName()const
|
||||
{
|
||||
return versionName_;
|
||||
}
|
||||
|
||||
std::string UpdateArtifactResult::getArtifactProperty()const
|
||||
{
|
||||
return artifactProperty_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user