Add pipeline status api.
This commit is contained in:
557
devops-rdc/src/Devops-rdcClient.cc
Normal file
557
devops-rdc/src/Devops-rdcClient.cc
Normal file
@@ -0,0 +1,557 @@
|
||||
/*
|
||||
* 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/devops-rdc/Devops_rdcClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "devops-rdc";
|
||||
}
|
||||
|
||||
Devops_rdcClient::Devops_rdcClient(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, "");
|
||||
}
|
||||
|
||||
Devops_rdcClient::Devops_rdcClient(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, "");
|
||||
}
|
||||
|
||||
Devops_rdcClient::Devops_rdcClient(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, "");
|
||||
}
|
||||
|
||||
Devops_rdcClient::~Devops_rdcClient()
|
||||
{}
|
||||
|
||||
Devops_rdcClient::CancelPipelineOutcome Devops_rdcClient::cancelPipeline(const CancelPipelineRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CancelPipelineOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CancelPipelineOutcome(CancelPipelineResult(outcome.result()));
|
||||
else
|
||||
return CancelPipelineOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::cancelPipelineAsync(const CancelPipelineRequest& request, const CancelPipelineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, cancelPipeline(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::CancelPipelineOutcomeCallable Devops_rdcClient::cancelPipelineCallable(const CancelPipelineRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CancelPipelineOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->cancelPipeline(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::CreateCredentialOutcome Devops_rdcClient::createCredential(const CreateCredentialRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateCredentialOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateCredentialOutcome(CreateCredentialResult(outcome.result()));
|
||||
else
|
||||
return CreateCredentialOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::createCredentialAsync(const CreateCredentialRequest& request, const CreateCredentialAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createCredential(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::CreateCredentialOutcomeCallable Devops_rdcClient::createCredentialCallable(const CreateCredentialRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateCredentialOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createCredential(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::CreatePipelineOutcome Devops_rdcClient::createPipeline(const CreatePipelineRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreatePipelineOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreatePipelineOutcome(CreatePipelineResult(outcome.result()));
|
||||
else
|
||||
return CreatePipelineOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::createPipelineAsync(const CreatePipelineRequest& request, const CreatePipelineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createPipeline(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::CreatePipelineOutcomeCallable Devops_rdcClient::createPipelineCallable(const CreatePipelineRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreatePipelineOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createPipeline(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::CreateServiceConnectionOutcome Devops_rdcClient::createServiceConnection(const CreateServiceConnectionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateServiceConnectionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateServiceConnectionOutcome(CreateServiceConnectionResult(outcome.result()));
|
||||
else
|
||||
return CreateServiceConnectionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::createServiceConnectionAsync(const CreateServiceConnectionRequest& request, const CreateServiceConnectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createServiceConnection(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::CreateServiceConnectionOutcomeCallable Devops_rdcClient::createServiceConnectionCallable(const CreateServiceConnectionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateServiceConnectionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createServiceConnection(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::ExecutePipelineOutcome Devops_rdcClient::executePipeline(const ExecutePipelineRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ExecutePipelineOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ExecutePipelineOutcome(ExecutePipelineResult(outcome.result()));
|
||||
else
|
||||
return ExecutePipelineOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::executePipelineAsync(const ExecutePipelineRequest& request, const ExecutePipelineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, executePipeline(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::ExecutePipelineOutcomeCallable Devops_rdcClient::executePipelineCallable(const ExecutePipelineRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ExecutePipelineOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->executePipeline(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceBuildNumberStatusOutcome Devops_rdcClient::getPipelineInstanceBuildNumberStatus(const GetPipelineInstanceBuildNumberStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipelineInstanceBuildNumberStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipelineInstanceBuildNumberStatusOutcome(GetPipelineInstanceBuildNumberStatusResult(outcome.result()));
|
||||
else
|
||||
return GetPipelineInstanceBuildNumberStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipelineInstanceBuildNumberStatusAsync(const GetPipelineInstanceBuildNumberStatusRequest& request, const GetPipelineInstanceBuildNumberStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipelineInstanceBuildNumberStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceBuildNumberStatusOutcomeCallable Devops_rdcClient::getPipelineInstanceBuildNumberStatusCallable(const GetPipelineInstanceBuildNumberStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipelineInstanceBuildNumberStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipelineInstanceBuildNumberStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceGroupStatusOutcome Devops_rdcClient::getPipelineInstanceGroupStatus(const GetPipelineInstanceGroupStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipelineInstanceGroupStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipelineInstanceGroupStatusOutcome(GetPipelineInstanceGroupStatusResult(outcome.result()));
|
||||
else
|
||||
return GetPipelineInstanceGroupStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipelineInstanceGroupStatusAsync(const GetPipelineInstanceGroupStatusRequest& request, const GetPipelineInstanceGroupStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipelineInstanceGroupStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceGroupStatusOutcomeCallable Devops_rdcClient::getPipelineInstanceGroupStatusCallable(const GetPipelineInstanceGroupStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipelineInstanceGroupStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipelineInstanceGroupStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceInfoOutcome Devops_rdcClient::getPipelineInstanceInfo(const GetPipelineInstanceInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipelineInstanceInfoOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipelineInstanceInfoOutcome(GetPipelineInstanceInfoResult(outcome.result()));
|
||||
else
|
||||
return GetPipelineInstanceInfoOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipelineInstanceInfoAsync(const GetPipelineInstanceInfoRequest& request, const GetPipelineInstanceInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipelineInstanceInfo(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceInfoOutcomeCallable Devops_rdcClient::getPipelineInstanceInfoCallable(const GetPipelineInstanceInfoRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipelineInstanceInfoOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipelineInstanceInfo(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceStatusOutcome Devops_rdcClient::getPipelineInstanceStatus(const GetPipelineInstanceStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipelineInstanceStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipelineInstanceStatusOutcome(GetPipelineInstanceStatusResult(outcome.result()));
|
||||
else
|
||||
return GetPipelineInstanceStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipelineInstanceStatusAsync(const GetPipelineInstanceStatusRequest& request, const GetPipelineInstanceStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipelineInstanceStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineInstanceStatusOutcomeCallable Devops_rdcClient::getPipelineInstanceStatusCallable(const GetPipelineInstanceStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipelineInstanceStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipelineInstanceStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineLogOutcome Devops_rdcClient::getPipelineLog(const GetPipelineLogRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipelineLogOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipelineLogOutcome(GetPipelineLogResult(outcome.result()));
|
||||
else
|
||||
return GetPipelineLogOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipelineLogAsync(const GetPipelineLogRequest& request, const GetPipelineLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipelineLog(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipelineLogOutcomeCallable Devops_rdcClient::getPipelineLogCallable(const GetPipelineLogRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipelineLogOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipelineLog(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipleineLatestInstanceStatusOutcome Devops_rdcClient::getPipleineLatestInstanceStatus(const GetPipleineLatestInstanceStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPipleineLatestInstanceStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPipleineLatestInstanceStatusOutcome(GetPipleineLatestInstanceStatusResult(outcome.result()));
|
||||
else
|
||||
return GetPipleineLatestInstanceStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::getPipleineLatestInstanceStatusAsync(const GetPipleineLatestInstanceStatusRequest& request, const GetPipleineLatestInstanceStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPipleineLatestInstanceStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::GetPipleineLatestInstanceStatusOutcomeCallable Devops_rdcClient::getPipleineLatestInstanceStatusCallable(const GetPipleineLatestInstanceStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPipleineLatestInstanceStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPipleineLatestInstanceStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListCredentialsOutcome Devops_rdcClient::listCredentials(const ListCredentialsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListCredentialsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListCredentialsOutcome(ListCredentialsResult(outcome.result()));
|
||||
else
|
||||
return ListCredentialsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::listCredentialsAsync(const ListCredentialsRequest& request, const ListCredentialsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listCredentials(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListCredentialsOutcomeCallable Devops_rdcClient::listCredentialsCallable(const ListCredentialsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListCredentialsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listCredentials(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListPipelinesOutcome Devops_rdcClient::listPipelines(const ListPipelinesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListPipelinesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListPipelinesOutcome(ListPipelinesResult(outcome.result()));
|
||||
else
|
||||
return ListPipelinesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::listPipelinesAsync(const ListPipelinesRequest& request, const ListPipelinesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listPipelines(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListPipelinesOutcomeCallable Devops_rdcClient::listPipelinesCallable(const ListPipelinesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListPipelinesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listPipelines(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListServiceConnectionsOutcome Devops_rdcClient::listServiceConnections(const ListServiceConnectionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServiceConnectionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServiceConnectionsOutcome(ListServiceConnectionsResult(outcome.result()));
|
||||
else
|
||||
return ListServiceConnectionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::listServiceConnectionsAsync(const ListServiceConnectionsRequest& request, const ListServiceConnectionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServiceConnections(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListServiceConnectionsOutcomeCallable Devops_rdcClient::listServiceConnectionsCallable(const ListServiceConnectionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServiceConnectionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServiceConnections(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
73
devops-rdc/src/model/CancelPipelineRequest.cc
Normal file
73
devops-rdc/src/model/CancelPipelineRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/CancelPipelineRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::CancelPipelineRequest;
|
||||
|
||||
CancelPipelineRequest::CancelPipelineRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "CancelPipeline")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CancelPipelineRequest::~CancelPipelineRequest()
|
||||
{}
|
||||
|
||||
long CancelPipelineRequest::getFlowInstanceId()const
|
||||
{
|
||||
return flowInstanceId_;
|
||||
}
|
||||
|
||||
void CancelPipelineRequest::setFlowInstanceId(long flowInstanceId)
|
||||
{
|
||||
flowInstanceId_ = flowInstanceId;
|
||||
setBodyParameter("FlowInstanceId", std::to_string(flowInstanceId));
|
||||
}
|
||||
|
||||
std::string CancelPipelineRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void CancelPipelineRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string CancelPipelineRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void CancelPipelineRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long CancelPipelineRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void CancelPipelineRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setBodyParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/CancelPipelineResult.cc
Normal file
72
devops-rdc/src/model/CancelPipelineResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/CancelPipelineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
CancelPipelineResult::CancelPipelineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CancelPipelineResult::CancelPipelineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CancelPipelineResult::~CancelPipelineResult()
|
||||
{}
|
||||
|
||||
void CancelPipelineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Object"].isNull())
|
||||
object_ = value["Object"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool CancelPipelineResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string CancelPipelineResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string CancelPipelineResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool CancelPipelineResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
95
devops-rdc/src/model/CreateCredentialRequest.cc
Normal file
95
devops-rdc/src/model/CreateCredentialRequest.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/CreateCredentialRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::CreateCredentialRequest;
|
||||
|
||||
CreateCredentialRequest::CreateCredentialRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "CreateCredential")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateCredentialRequest::~CreateCredentialRequest()
|
||||
{}
|
||||
|
||||
std::string CreateCredentialRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void CreateCredentialRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setBodyParameter("Type", type);
|
||||
}
|
||||
|
||||
std::string CreateCredentialRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void CreateCredentialRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string CreateCredentialRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void CreateCredentialRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
std::string CreateCredentialRequest::getPassword()const
|
||||
{
|
||||
return password_;
|
||||
}
|
||||
|
||||
void CreateCredentialRequest::setPassword(const std::string& password)
|
||||
{
|
||||
password_ = password;
|
||||
setBodyParameter("Password", password);
|
||||
}
|
||||
|
||||
std::string CreateCredentialRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreateCredentialRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setBodyParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string CreateCredentialRequest::getUserName()const
|
||||
{
|
||||
return userName_;
|
||||
}
|
||||
|
||||
void CreateCredentialRequest::setUserName(const std::string& userName)
|
||||
{
|
||||
userName_ = userName;
|
||||
setBodyParameter("UserName", userName);
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/CreateCredentialResult.cc
Normal file
72
devops-rdc/src/model/CreateCredentialResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/CreateCredentialResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
CreateCredentialResult::CreateCredentialResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateCredentialResult::CreateCredentialResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateCredentialResult::~CreateCredentialResult()
|
||||
{}
|
||||
|
||||
void CreateCredentialResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Object"].isNull())
|
||||
object_ = std::stol(value["Object"].asString());
|
||||
|
||||
}
|
||||
|
||||
long CreateCredentialResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string CreateCredentialResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string CreateCredentialResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool CreateCredentialResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
62
devops-rdc/src/model/CreatePipelineRequest.cc
Normal file
62
devops-rdc/src/model/CreatePipelineRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/CreatePipelineRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::CreatePipelineRequest;
|
||||
|
||||
CreatePipelineRequest::CreatePipelineRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "CreatePipeline")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreatePipelineRequest::~CreatePipelineRequest()
|
||||
{}
|
||||
|
||||
std::string CreatePipelineRequest::getPipeline()const
|
||||
{
|
||||
return pipeline_;
|
||||
}
|
||||
|
||||
void CreatePipelineRequest::setPipeline(const std::string& pipeline)
|
||||
{
|
||||
pipeline_ = pipeline;
|
||||
setBodyParameter("Pipeline", pipeline);
|
||||
}
|
||||
|
||||
std::string CreatePipelineRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void CreatePipelineRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string CreatePipelineRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void CreatePipelineRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/CreatePipelineResult.cc
Normal file
72
devops-rdc/src/model/CreatePipelineResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/CreatePipelineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
CreatePipelineResult::CreatePipelineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreatePipelineResult::CreatePipelineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreatePipelineResult::~CreatePipelineResult()
|
||||
{}
|
||||
|
||||
void CreatePipelineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Object"].isNull())
|
||||
object_ = std::stol(value["Object"].asString());
|
||||
|
||||
}
|
||||
|
||||
long CreatePipelineResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string CreatePipelineResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string CreatePipelineResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool CreatePipelineResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
62
devops-rdc/src/model/CreateServiceConnectionRequest.cc
Normal file
62
devops-rdc/src/model/CreateServiceConnectionRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/CreateServiceConnectionRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::CreateServiceConnectionRequest;
|
||||
|
||||
CreateServiceConnectionRequest::CreateServiceConnectionRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "CreateServiceConnection")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateServiceConnectionRequest::~CreateServiceConnectionRequest()
|
||||
{}
|
||||
|
||||
std::string CreateServiceConnectionRequest::getServiceConnectionType()const
|
||||
{
|
||||
return serviceConnectionType_;
|
||||
}
|
||||
|
||||
void CreateServiceConnectionRequest::setServiceConnectionType(const std::string& serviceConnectionType)
|
||||
{
|
||||
serviceConnectionType_ = serviceConnectionType;
|
||||
setBodyParameter("ServiceConnectionType", serviceConnectionType);
|
||||
}
|
||||
|
||||
std::string CreateServiceConnectionRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void CreateServiceConnectionRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string CreateServiceConnectionRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void CreateServiceConnectionRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/CreateServiceConnectionResult.cc
Normal file
72
devops-rdc/src/model/CreateServiceConnectionResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/CreateServiceConnectionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
CreateServiceConnectionResult::CreateServiceConnectionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateServiceConnectionResult::CreateServiceConnectionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateServiceConnectionResult::~CreateServiceConnectionResult()
|
||||
{}
|
||||
|
||||
void CreateServiceConnectionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Object"].isNull())
|
||||
object_ = std::stol(value["Object"].asString());
|
||||
|
||||
}
|
||||
|
||||
long CreateServiceConnectionResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string CreateServiceConnectionResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string CreateServiceConnectionResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool CreateServiceConnectionResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
devops-rdc/src/model/ExecutePipelineRequest.cc
Normal file
73
devops-rdc/src/model/ExecutePipelineRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/ExecutePipelineRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::ExecutePipelineRequest;
|
||||
|
||||
ExecutePipelineRequest::ExecutePipelineRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "ExecutePipeline")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ExecutePipelineRequest::~ExecutePipelineRequest()
|
||||
{}
|
||||
|
||||
std::string ExecutePipelineRequest::getParameters()const
|
||||
{
|
||||
return parameters_;
|
||||
}
|
||||
|
||||
void ExecutePipelineRequest::setParameters(const std::string& parameters)
|
||||
{
|
||||
parameters_ = parameters;
|
||||
setBodyParameter("Parameters", parameters);
|
||||
}
|
||||
|
||||
std::string ExecutePipelineRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void ExecutePipelineRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string ExecutePipelineRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void ExecutePipelineRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long ExecutePipelineRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void ExecutePipelineRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setBodyParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/ExecutePipelineResult.cc
Normal file
72
devops-rdc/src/model/ExecutePipelineResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/ExecutePipelineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
ExecutePipelineResult::ExecutePipelineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ExecutePipelineResult::ExecutePipelineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ExecutePipelineResult::~ExecutePipelineResult()
|
||||
{}
|
||||
|
||||
void ExecutePipelineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Object"].isNull())
|
||||
object_ = std::stol(value["Object"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ExecutePipelineResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string ExecutePipelineResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string ExecutePipelineResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool ExecutePipelineResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/GetPipelineInstanceBuildNumberStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipelineInstanceBuildNumberStatusRequest;
|
||||
|
||||
GetPipelineInstanceBuildNumberStatusRequest::GetPipelineInstanceBuildNumberStatusRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipelineInstanceBuildNumberStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipelineInstanceBuildNumberStatusRequest::~GetPipelineInstanceBuildNumberStatusRequest()
|
||||
{}
|
||||
|
||||
long GetPipelineInstanceBuildNumberStatusRequest::getBuildNum()const
|
||||
{
|
||||
return buildNum_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceBuildNumberStatusRequest::setBuildNum(long buildNum)
|
||||
{
|
||||
buildNum_ = buildNum;
|
||||
setBodyParameter("BuildNum", std::to_string(buildNum));
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceBuildNumberStatusRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceBuildNumberStatusRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceBuildNumberStatusRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceBuildNumberStatusRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipelineInstanceBuildNumberStatusRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceBuildNumberStatusRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/GetPipelineInstanceBuildNumberStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipelineInstanceBuildNumberStatusResult::GetPipelineInstanceBuildNumberStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipelineInstanceBuildNumberStatusResult::GetPipelineInstanceBuildNumberStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipelineInstanceBuildNumberStatusResult::~GetPipelineInstanceBuildNumberStatusResult()
|
||||
{}
|
||||
|
||||
void GetPipelineInstanceBuildNumberStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto objectNode = value["Object"];
|
||||
if(!objectNode["Status"].isNull())
|
||||
object_.status = objectNode["Status"].asString();
|
||||
auto allGroupsNode = objectNode["Groups"]["group"];
|
||||
for (auto objectNodeGroupsgroup : allGroupsNode)
|
||||
{
|
||||
Object::Group groupObject;
|
||||
if(!objectNodeGroupsgroup["Name"].isNull())
|
||||
groupObject.name = objectNodeGroupsgroup["Name"].asString();
|
||||
if(!objectNodeGroupsgroup["Status"].isNull())
|
||||
groupObject.status = objectNodeGroupsgroup["Status"].asString();
|
||||
auto allStagesNode = allGroupsNode["Stages"]["stage"];
|
||||
for (auto allGroupsNodeStagesstage : allStagesNode)
|
||||
{
|
||||
Object::Group::Stage stagesObject;
|
||||
if(!allGroupsNodeStagesstage["Status"].isNull())
|
||||
stagesObject.status = allGroupsNodeStagesstage["Status"].asString();
|
||||
if(!allGroupsNodeStagesstage["Sign"].isNull())
|
||||
stagesObject.sign = allGroupsNodeStagesstage["Sign"].asString();
|
||||
auto allComponentsNode = allStagesNode["Components"]["component"];
|
||||
for (auto allStagesNodeComponentscomponent : allComponentsNode)
|
||||
{
|
||||
Object::Group::Stage::Component componentsObject;
|
||||
if(!allStagesNodeComponentscomponent["Name"].isNull())
|
||||
componentsObject.name = allStagesNodeComponentscomponent["Name"].asString();
|
||||
if(!allStagesNodeComponentscomponent["Status"].isNull())
|
||||
componentsObject.status = allStagesNodeComponentscomponent["Status"].asString();
|
||||
if(!allStagesNodeComponentscomponent["JobId"].isNull())
|
||||
componentsObject.jobId = std::stol(allStagesNodeComponentscomponent["JobId"].asString());
|
||||
stagesObject.components.push_back(componentsObject);
|
||||
}
|
||||
groupObject.stages.push_back(stagesObject);
|
||||
}
|
||||
object_.groups.push_back(groupObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetPipelineInstanceBuildNumberStatusResult::Object GetPipelineInstanceBuildNumberStatusResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceBuildNumberStatusResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceBuildNumberStatusResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipelineInstanceBuildNumberStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/GetPipelineInstanceGroupStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipelineInstanceGroupStatusRequest;
|
||||
|
||||
GetPipelineInstanceGroupStatusRequest::GetPipelineInstanceGroupStatusRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipelineInstanceGroupStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipelineInstanceGroupStatusRequest::~GetPipelineInstanceGroupStatusRequest()
|
||||
{}
|
||||
|
||||
long GetPipelineInstanceGroupStatusRequest::getFlowInstanceId()const
|
||||
{
|
||||
return flowInstanceId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceGroupStatusRequest::setFlowInstanceId(long flowInstanceId)
|
||||
{
|
||||
flowInstanceId_ = flowInstanceId;
|
||||
setBodyParameter("FlowInstanceId", std::to_string(flowInstanceId));
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceGroupStatusRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceGroupStatusRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceGroupStatusRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceGroupStatusRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipelineInstanceGroupStatusRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceGroupStatusRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
105
devops-rdc/src/model/GetPipelineInstanceGroupStatusResult.cc
Normal file
105
devops-rdc/src/model/GetPipelineInstanceGroupStatusResult.cc
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/GetPipelineInstanceGroupStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipelineInstanceGroupStatusResult::GetPipelineInstanceGroupStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipelineInstanceGroupStatusResult::GetPipelineInstanceGroupStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipelineInstanceGroupStatusResult::~GetPipelineInstanceGroupStatusResult()
|
||||
{}
|
||||
|
||||
void GetPipelineInstanceGroupStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto objectNode = value["Object"];
|
||||
if(!objectNode["Status"].isNull())
|
||||
object_.status = objectNode["Status"].asString();
|
||||
auto allGroupsNode = objectNode["Groups"]["group"];
|
||||
for (auto objectNodeGroupsgroup : allGroupsNode)
|
||||
{
|
||||
Object::Group groupObject;
|
||||
if(!objectNodeGroupsgroup["Name"].isNull())
|
||||
groupObject.name = objectNodeGroupsgroup["Name"].asString();
|
||||
if(!objectNodeGroupsgroup["Status"].isNull())
|
||||
groupObject.status = objectNodeGroupsgroup["Status"].asString();
|
||||
auto allStagesNode = allGroupsNode["Stages"]["stage"];
|
||||
for (auto allGroupsNodeStagesstage : allStagesNode)
|
||||
{
|
||||
Object::Group::Stage stagesObject;
|
||||
if(!allGroupsNodeStagesstage["Status"].isNull())
|
||||
stagesObject.status = allGroupsNodeStagesstage["Status"].asString();
|
||||
if(!allGroupsNodeStagesstage["Sign"].isNull())
|
||||
stagesObject.sign = allGroupsNodeStagesstage["Sign"].asString();
|
||||
auto allComponentsNode = allStagesNode["Components"]["component"];
|
||||
for (auto allStagesNodeComponentscomponent : allComponentsNode)
|
||||
{
|
||||
Object::Group::Stage::Component componentsObject;
|
||||
if(!allStagesNodeComponentscomponent["Name"].isNull())
|
||||
componentsObject.name = allStagesNodeComponentscomponent["Name"].asString();
|
||||
if(!allStagesNodeComponentscomponent["Status"].isNull())
|
||||
componentsObject.status = allStagesNodeComponentscomponent["Status"].asString();
|
||||
if(!allStagesNodeComponentscomponent["JobId"].isNull())
|
||||
componentsObject.jobId = allStagesNodeComponentscomponent["JobId"].asString();
|
||||
stagesObject.components.push_back(componentsObject);
|
||||
}
|
||||
groupObject.stages.push_back(stagesObject);
|
||||
}
|
||||
object_.groups.push_back(groupObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetPipelineInstanceGroupStatusResult::Object GetPipelineInstanceGroupStatusResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceGroupStatusResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceGroupStatusResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipelineInstanceGroupStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
devops-rdc/src/model/GetPipelineInstanceInfoRequest.cc
Normal file
73
devops-rdc/src/model/GetPipelineInstanceInfoRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/GetPipelineInstanceInfoRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipelineInstanceInfoRequest;
|
||||
|
||||
GetPipelineInstanceInfoRequest::GetPipelineInstanceInfoRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipelineInstanceInfo")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipelineInstanceInfoRequest::~GetPipelineInstanceInfoRequest()
|
||||
{}
|
||||
|
||||
std::string GetPipelineInstanceInfoRequest::getFlowInstanceId()const
|
||||
{
|
||||
return flowInstanceId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceInfoRequest::setFlowInstanceId(const std::string& flowInstanceId)
|
||||
{
|
||||
flowInstanceId_ = flowInstanceId;
|
||||
setBodyParameter("FlowInstanceId", flowInstanceId);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceInfoRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceInfoRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceInfoRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceInfoRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipelineInstanceInfoRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceInfoRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setBodyParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
87
devops-rdc/src/model/GetPipelineInstanceInfoResult.cc
Normal file
87
devops-rdc/src/model/GetPipelineInstanceInfoResult.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/GetPipelineInstanceInfoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipelineInstanceInfoResult::GetPipelineInstanceInfoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipelineInstanceInfoResult::GetPipelineInstanceInfoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipelineInstanceInfoResult::~GetPipelineInstanceInfoResult()
|
||||
{}
|
||||
|
||||
void GetPipelineInstanceInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto objectNode = value["Object"];
|
||||
if(!objectNode["Status"].isNull())
|
||||
object_.status = objectNode["Status"].asString();
|
||||
if(!objectNode["StartTime"].isNull())
|
||||
object_.startTime = std::stol(objectNode["StartTime"].asString());
|
||||
if(!objectNode["EndTime"].isNull())
|
||||
object_.endTime = std::stol(objectNode["EndTime"].asString());
|
||||
if(!objectNode["Sources"].isNull())
|
||||
object_.sources = objectNode["Sources"].asString();
|
||||
if(!objectNode["EmployeeId"].isNull())
|
||||
object_.employeeId = objectNode["EmployeeId"].asString();
|
||||
auto allPackageDownloadUrls = objectNode["PackageDownloadUrls"]["PackageDownloadUrls"];
|
||||
for (auto value : allPackageDownloadUrls)
|
||||
object_.packageDownloadUrls.push_back(value.asString());
|
||||
auto allDockerImages = objectNode["DockerImages"]["DockerImages"];
|
||||
for (auto value : allDockerImages)
|
||||
object_.dockerImages.push_back(value.asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
GetPipelineInstanceInfoResult::Object GetPipelineInstanceInfoResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceInfoResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceInfoResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipelineInstanceInfoResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
devops-rdc/src/model/GetPipelineInstanceStatusRequest.cc
Normal file
73
devops-rdc/src/model/GetPipelineInstanceStatusRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/GetPipelineInstanceStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipelineInstanceStatusRequest;
|
||||
|
||||
GetPipelineInstanceStatusRequest::GetPipelineInstanceStatusRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipelineInstanceStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipelineInstanceStatusRequest::~GetPipelineInstanceStatusRequest()
|
||||
{}
|
||||
|
||||
long GetPipelineInstanceStatusRequest::getFlowInstanceId()const
|
||||
{
|
||||
return flowInstanceId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceStatusRequest::setFlowInstanceId(long flowInstanceId)
|
||||
{
|
||||
flowInstanceId_ = flowInstanceId;
|
||||
setParameter("FlowInstanceId", std::to_string(flowInstanceId));
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceStatusRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceStatusRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceStatusRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceStatusRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipelineInstanceStatusRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipelineInstanceStatusRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/GetPipelineInstanceStatusResult.cc
Normal file
72
devops-rdc/src/model/GetPipelineInstanceStatusResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/GetPipelineInstanceStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipelineInstanceStatusResult::GetPipelineInstanceStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipelineInstanceStatusResult::GetPipelineInstanceStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipelineInstanceStatusResult::~GetPipelineInstanceStatusResult()
|
||||
{}
|
||||
|
||||
void GetPipelineInstanceStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Object"].isNull())
|
||||
object_ = value["Object"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceStatusResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceStatusResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipelineInstanceStatusResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipelineInstanceStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
73
devops-rdc/src/model/GetPipelineLogRequest.cc
Normal file
73
devops-rdc/src/model/GetPipelineLogRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/GetPipelineLogRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipelineLogRequest;
|
||||
|
||||
GetPipelineLogRequest::GetPipelineLogRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipelineLog")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipelineLogRequest::~GetPipelineLogRequest()
|
||||
{}
|
||||
|
||||
std::string GetPipelineLogRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipelineLogRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipelineLogRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipelineLogRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipelineLogRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipelineLogRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setBodyParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
long GetPipelineLogRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void GetPipelineLogRequest::setJobId(long jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setBodyParameter("JobId", std::to_string(jobId));
|
||||
}
|
||||
|
||||
94
devops-rdc/src/model/GetPipelineLogResult.cc
Normal file
94
devops-rdc/src/model/GetPipelineLogResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/GetPipelineLogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipelineLogResult::GetPipelineLogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipelineLogResult::GetPipelineLogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipelineLogResult::~GetPipelineLogResult()
|
||||
{}
|
||||
|
||||
void GetPipelineLogResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allObjectNode = value["Object"]["job"];
|
||||
for (auto valueObjectjob : allObjectNode)
|
||||
{
|
||||
Job objectObject;
|
||||
if(!valueObjectjob["JobId"].isNull())
|
||||
objectObject.jobId = std::stol(valueObjectjob["JobId"].asString());
|
||||
if(!valueObjectjob["ActionName"].isNull())
|
||||
objectObject.actionName = valueObjectjob["ActionName"].asString();
|
||||
if(!valueObjectjob["StartTime"].isNull())
|
||||
objectObject.startTime = valueObjectjob["StartTime"].asString();
|
||||
auto allBuildProcessNodesNode = allObjectNode["BuildProcessNodes"]["buildProcessNode"];
|
||||
for (auto allObjectNodeBuildProcessNodesbuildProcessNode : allBuildProcessNodesNode)
|
||||
{
|
||||
Job::BuildProcessNode buildProcessNodesObject;
|
||||
if(!allObjectNodeBuildProcessNodesbuildProcessNode["NodeName"].isNull())
|
||||
buildProcessNodesObject.nodeName = allObjectNodeBuildProcessNodesbuildProcessNode["NodeName"].asString();
|
||||
if(!allObjectNodeBuildProcessNodesbuildProcessNode["NodeIndex"].isNull())
|
||||
buildProcessNodesObject.nodeIndex = std::stoi(allObjectNodeBuildProcessNodesbuildProcessNode["NodeIndex"].asString());
|
||||
if(!allObjectNodeBuildProcessNodesbuildProcessNode["Status"].isNull())
|
||||
buildProcessNodesObject.status = allObjectNodeBuildProcessNodesbuildProcessNode["Status"].asString();
|
||||
objectObject.buildProcessNodes.push_back(buildProcessNodesObject);
|
||||
}
|
||||
object_.push_back(objectObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetPipelineLogResult::Job> GetPipelineLogResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string GetPipelineLogResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipelineLogResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipelineLogResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/GetPipleineLatestInstanceStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::GetPipleineLatestInstanceStatusRequest;
|
||||
|
||||
GetPipleineLatestInstanceStatusRequest::GetPipleineLatestInstanceStatusRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "GetPipleineLatestInstanceStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPipleineLatestInstanceStatusRequest::~GetPipleineLatestInstanceStatusRequest()
|
||||
{}
|
||||
|
||||
std::string GetPipleineLatestInstanceStatusRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void GetPipleineLatestInstanceStatusRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string GetPipleineLatestInstanceStatusRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void GetPipleineLatestInstanceStatusRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
long GetPipleineLatestInstanceStatusRequest::getPipelineId()const
|
||||
{
|
||||
return pipelineId_;
|
||||
}
|
||||
|
||||
void GetPipleineLatestInstanceStatusRequest::setPipelineId(long pipelineId)
|
||||
{
|
||||
pipelineId_ = pipelineId;
|
||||
setParameter("PipelineId", std::to_string(pipelineId));
|
||||
}
|
||||
|
||||
105
devops-rdc/src/model/GetPipleineLatestInstanceStatusResult.cc
Normal file
105
devops-rdc/src/model/GetPipleineLatestInstanceStatusResult.cc
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/GetPipleineLatestInstanceStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
GetPipleineLatestInstanceStatusResult::GetPipleineLatestInstanceStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPipleineLatestInstanceStatusResult::GetPipleineLatestInstanceStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPipleineLatestInstanceStatusResult::~GetPipleineLatestInstanceStatusResult()
|
||||
{}
|
||||
|
||||
void GetPipleineLatestInstanceStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto objectNode = value["Object"];
|
||||
if(!objectNode["Status"].isNull())
|
||||
object_.status = objectNode["Status"].asString();
|
||||
auto allGroupsNode = objectNode["Groups"]["group"];
|
||||
for (auto objectNodeGroupsgroup : allGroupsNode)
|
||||
{
|
||||
Object::Group groupObject;
|
||||
if(!objectNodeGroupsgroup["Name"].isNull())
|
||||
groupObject.name = objectNodeGroupsgroup["Name"].asString();
|
||||
if(!objectNodeGroupsgroup["Status"].isNull())
|
||||
groupObject.status = objectNodeGroupsgroup["Status"].asString();
|
||||
auto allStagesNode = allGroupsNode["Stages"]["stage"];
|
||||
for (auto allGroupsNodeStagesstage : allStagesNode)
|
||||
{
|
||||
Object::Group::Stage stagesObject;
|
||||
if(!allGroupsNodeStagesstage["Status"].isNull())
|
||||
stagesObject.status = allGroupsNodeStagesstage["Status"].asString();
|
||||
if(!allGroupsNodeStagesstage["Sign"].isNull())
|
||||
stagesObject.sign = allGroupsNodeStagesstage["Sign"].asString();
|
||||
auto allComponentsNode = allStagesNode["Components"]["component"];
|
||||
for (auto allStagesNodeComponentscomponent : allComponentsNode)
|
||||
{
|
||||
Object::Group::Stage::Component componentsObject;
|
||||
if(!allStagesNodeComponentscomponent["Name"].isNull())
|
||||
componentsObject.name = allStagesNodeComponentscomponent["Name"].asString();
|
||||
if(!allStagesNodeComponentscomponent["Status"].isNull())
|
||||
componentsObject.status = allStagesNodeComponentscomponent["Status"].asString();
|
||||
if(!allStagesNodeComponentscomponent["JobId"].isNull())
|
||||
componentsObject.jobId = std::stol(allStagesNodeComponentscomponent["JobId"].asString());
|
||||
stagesObject.components.push_back(componentsObject);
|
||||
}
|
||||
groupObject.stages.push_back(stagesObject);
|
||||
}
|
||||
object_.groups.push_back(groupObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetPipleineLatestInstanceStatusResult::Object GetPipleineLatestInstanceStatusResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string GetPipleineLatestInstanceStatusResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetPipleineLatestInstanceStatusResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetPipleineLatestInstanceStatusResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
51
devops-rdc/src/model/ListCredentialsRequest.cc
Normal file
51
devops-rdc/src/model/ListCredentialsRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/ListCredentialsRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::ListCredentialsRequest;
|
||||
|
||||
ListCredentialsRequest::ListCredentialsRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "ListCredentials")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListCredentialsRequest::~ListCredentialsRequest()
|
||||
{}
|
||||
|
||||
std::string ListCredentialsRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void ListCredentialsRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string ListCredentialsRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void ListCredentialsRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
73
devops-rdc/src/model/ListCredentialsResult.cc
Normal file
73
devops-rdc/src/model/ListCredentialsResult.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/ListCredentialsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
ListCredentialsResult::ListCredentialsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListCredentialsResult::ListCredentialsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListCredentialsResult::~ListCredentialsResult()
|
||||
{}
|
||||
|
||||
void ListCredentialsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allObject = value["Object"]["Object"];
|
||||
for (const auto &item : allObject)
|
||||
object_.push_back(item.asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> ListCredentialsResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string ListCredentialsResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string ListCredentialsResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool ListCredentialsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
161
devops-rdc/src/model/ListPipelinesRequest.cc
Normal file
161
devops-rdc/src/model/ListPipelinesRequest.cc
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/ListPipelinesRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::ListPipelinesRequest;
|
||||
|
||||
ListPipelinesRequest::ListPipelinesRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "ListPipelines")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListPipelinesRequest::~ListPipelinesRequest()
|
||||
{}
|
||||
|
||||
std::string ListPipelinesRequest::getPipelineName()const
|
||||
{
|
||||
return pipelineName_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setPipelineName(const std::string& pipelineName)
|
||||
{
|
||||
pipelineName_ = pipelineName;
|
||||
setBodyParameter("PipelineName", pipelineName);
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getResultStatusList()const
|
||||
{
|
||||
return resultStatusList_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setResultStatusList(const std::string& resultStatusList)
|
||||
{
|
||||
resultStatusList_ = resultStatusList;
|
||||
setBodyParameter("ResultStatusList", resultStatusList);
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getCreators()const
|
||||
{
|
||||
return creators_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setCreators(const std::string& creators)
|
||||
{
|
||||
creators_ = creators;
|
||||
setBodyParameter("Creators", creators);
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getExecuteEndTime()const
|
||||
{
|
||||
return executeEndTime_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setExecuteEndTime(const std::string& executeEndTime)
|
||||
{
|
||||
executeEndTime_ = executeEndTime;
|
||||
setBodyParameter("ExecuteEndTime", executeEndTime);
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getCreateStartTime()const
|
||||
{
|
||||
return createStartTime_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setCreateStartTime(const std::string& createStartTime)
|
||||
{
|
||||
createStartTime_ = createStartTime;
|
||||
setBodyParameter("CreateStartTime", createStartTime);
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getOperators()const
|
||||
{
|
||||
return operators_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setOperators(const std::string& operators)
|
||||
{
|
||||
operators_ = operators;
|
||||
setBodyParameter("Operators", operators);
|
||||
}
|
||||
|
||||
int ListPipelinesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getExecuteStartTime()const
|
||||
{
|
||||
return executeStartTime_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setExecuteStartTime(const std::string& executeStartTime)
|
||||
{
|
||||
executeStartTime_ = executeStartTime;
|
||||
setBodyParameter("ExecuteStartTime", executeStartTime);
|
||||
}
|
||||
|
||||
int ListPipelinesRequest::getPageStart()const
|
||||
{
|
||||
return pageStart_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setPageStart(int pageStart)
|
||||
{
|
||||
pageStart_ = pageStart;
|
||||
setBodyParameter("PageStart", std::to_string(pageStart));
|
||||
}
|
||||
|
||||
std::string ListPipelinesRequest::getCreateEndTime()const
|
||||
{
|
||||
return createEndTime_;
|
||||
}
|
||||
|
||||
void ListPipelinesRequest::setCreateEndTime(const std::string& createEndTime)
|
||||
{
|
||||
createEndTime_ = createEndTime;
|
||||
setBodyParameter("CreateEndTime", createEndTime);
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/ListPipelinesResult.cc
Normal file
72
devops-rdc/src/model/ListPipelinesResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/ListPipelinesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
ListPipelinesResult::ListPipelinesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListPipelinesResult::ListPipelinesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListPipelinesResult::~ListPipelinesResult()
|
||||
{}
|
||||
|
||||
void ListPipelinesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Object"].isNull())
|
||||
object_ = value["Object"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListPipelinesResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string ListPipelinesResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string ListPipelinesResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool ListPipelinesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
62
devops-rdc/src/model/ListServiceConnectionsRequest.cc
Normal file
62
devops-rdc/src/model/ListServiceConnectionsRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/ListServiceConnectionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::ListServiceConnectionsRequest;
|
||||
|
||||
ListServiceConnectionsRequest::ListServiceConnectionsRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "ListServiceConnections")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListServiceConnectionsRequest::~ListServiceConnectionsRequest()
|
||||
{}
|
||||
|
||||
std::string ListServiceConnectionsRequest::getScType()const
|
||||
{
|
||||
return scType_;
|
||||
}
|
||||
|
||||
void ListServiceConnectionsRequest::setScType(const std::string& scType)
|
||||
{
|
||||
scType_ = scType;
|
||||
setBodyParameter("ScType", scType);
|
||||
}
|
||||
|
||||
std::string ListServiceConnectionsRequest::getUserPk()const
|
||||
{
|
||||
return userPk_;
|
||||
}
|
||||
|
||||
void ListServiceConnectionsRequest::setUserPk(const std::string& userPk)
|
||||
{
|
||||
userPk_ = userPk;
|
||||
setBodyParameter("UserPk", userPk);
|
||||
}
|
||||
|
||||
std::string ListServiceConnectionsRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void ListServiceConnectionsRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
73
devops-rdc/src/model/ListServiceConnectionsResult.cc
Normal file
73
devops-rdc/src/model/ListServiceConnectionsResult.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/ListServiceConnectionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
ListServiceConnectionsResult::ListServiceConnectionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServiceConnectionsResult::ListServiceConnectionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServiceConnectionsResult::~ListServiceConnectionsResult()
|
||||
{}
|
||||
|
||||
void ListServiceConnectionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allObject = value["Object"]["Object"];
|
||||
for (const auto &item : allObject)
|
||||
object_.push_back(item.asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> ListServiceConnectionsResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string ListServiceConnectionsResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string ListServiceConnectionsResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool ListServiceConnectionsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user