-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
311 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.36.1990 | ||
1.36.1991 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
ecs-workbench/include/alibabacloud/ecs-workbench/model/ListTerminalCommandsRequest.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright 2009-2017 Alibaba Cloud All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef ALIBABACLOUD_ECS_WORKBENCH_MODEL_LISTTERMINALCOMMANDSREQUEST_H_ | ||
#define ALIBABACLOUD_ECS_WORKBENCH_MODEL_LISTTERMINALCOMMANDSREQUEST_H_ | ||
|
||
#include <alibabacloud/ecs-workbench/Ecs_workbenchExport.h> | ||
#include <alibabacloud/core/RpcServiceRequest.h> | ||
#include <string> | ||
#include <vector> | ||
#include <map> | ||
|
||
namespace AlibabaCloud { | ||
namespace Ecs_workbench { | ||
namespace Model { | ||
class ALIBABACLOUD_ECS_WORKBENCH_EXPORT ListTerminalCommandsRequest : public RpcServiceRequest { | ||
public: | ||
ListTerminalCommandsRequest(); | ||
~ListTerminalCommandsRequest(); | ||
int getPageNumber() const; | ||
void setPageNumber(int pageNumber); | ||
std::string getRegionId() const; | ||
void setRegionId(const std::string ®ionId); | ||
int getPageSize() const; | ||
void setPageSize(int pageSize); | ||
std::string getTerminalSessionToken() const; | ||
void setTerminalSessionToken(const std::string &terminalSessionToken); | ||
|
||
private: | ||
int pageNumber_; | ||
std::string regionId_; | ||
int pageSize_; | ||
std::string terminalSessionToken_; | ||
}; | ||
} // namespace Model | ||
} // namespace Ecs_workbench | ||
} // namespace AlibabaCloud | ||
#endif // !ALIBABACLOUD_ECS_WORKBENCH_MODEL_LISTTERMINALCOMMANDSREQUEST_H_ |
64 changes: 64 additions & 0 deletions
64
ecs-workbench/include/alibabacloud/ecs-workbench/model/ListTerminalCommandsResult.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright 2009-2017 Alibaba Cloud All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef ALIBABACLOUD_ECS_WORKBENCH_MODEL_LISTTERMINALCOMMANDSRESULT_H_ | ||
#define ALIBABACLOUD_ECS_WORKBENCH_MODEL_LISTTERMINALCOMMANDSRESULT_H_ | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <utility> | ||
#include <alibabacloud/core/ServiceResult.h> | ||
#include <alibabacloud/ecs-workbench/Ecs_workbenchExport.h> | ||
|
||
namespace AlibabaCloud | ||
{ | ||
namespace Ecs_workbench | ||
{ | ||
namespace Model | ||
{ | ||
class ALIBABACLOUD_ECS_WORKBENCH_EXPORT ListTerminalCommandsResult : public ServiceResult | ||
{ | ||
public: | ||
struct TerminalCommandListItem | ||
{ | ||
std::string commandLine; | ||
std::string createTime; | ||
std::string loginUser; | ||
std::string executePath; | ||
}; | ||
|
||
|
||
ListTerminalCommandsResult(); | ||
explicit ListTerminalCommandsResult(const std::string &payload); | ||
~ListTerminalCommandsResult(); | ||
int getTotalCount()const; | ||
int getPageSize()const; | ||
int getPageNumber()const; | ||
std::vector<TerminalCommandListItem> getTerminalCommandList()const; | ||
|
||
protected: | ||
void parse(const std::string &payload); | ||
private: | ||
int totalCount_; | ||
int pageSize_; | ||
int pageNumber_; | ||
std::vector<TerminalCommandListItem> terminalCommandList_; | ||
|
||
}; | ||
} | ||
} | ||
} | ||
#endif // !ALIBABACLOUD_ECS_WORKBENCH_MODEL_LISTTERMINALCOMMANDSRESULT_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* 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/ecs-workbench/model/ListTerminalCommandsRequest.h> | ||
|
||
using AlibabaCloud::Ecs_workbench::Model::ListTerminalCommandsRequest; | ||
|
||
ListTerminalCommandsRequest::ListTerminalCommandsRequest() | ||
: RpcServiceRequest("ecs-workbench", "2022-02-20", "ListTerminalCommands") { | ||
setMethod(HttpRequest::Method::Post); | ||
} | ||
|
||
ListTerminalCommandsRequest::~ListTerminalCommandsRequest() {} | ||
|
||
int ListTerminalCommandsRequest::getPageNumber() const { | ||
return pageNumber_; | ||
} | ||
|
||
void ListTerminalCommandsRequest::setPageNumber(int pageNumber) { | ||
pageNumber_ = pageNumber; | ||
setBodyParameter(std::string("PageNumber"), std::to_string(pageNumber)); | ||
} | ||
|
||
std::string ListTerminalCommandsRequest::getRegionId() const { | ||
return regionId_; | ||
} | ||
|
||
void ListTerminalCommandsRequest::setRegionId(const std::string ®ionId) { | ||
regionId_ = regionId; | ||
setBodyParameter(std::string("RegionId"), regionId); | ||
} | ||
|
||
int ListTerminalCommandsRequest::getPageSize() const { | ||
return pageSize_; | ||
} | ||
|
||
void ListTerminalCommandsRequest::setPageSize(int pageSize) { | ||
pageSize_ = pageSize; | ||
setBodyParameter(std::string("PageSize"), std::to_string(pageSize)); | ||
} | ||
|
||
std::string ListTerminalCommandsRequest::getTerminalSessionToken() const { | ||
return terminalSessionToken_; | ||
} | ||
|
||
void ListTerminalCommandsRequest::setTerminalSessionToken(const std::string &terminalSessionToken) { | ||
terminalSessionToken_ = terminalSessionToken; | ||
setBodyParameter(std::string("TerminalSessionToken"), terminalSessionToken); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Copyright 2009-2017 Alibaba Cloud All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <alibabacloud/ecs-workbench/model/ListTerminalCommandsResult.h> | ||
#include <json/json.h> | ||
|
||
using namespace AlibabaCloud::Ecs_workbench; | ||
using namespace AlibabaCloud::Ecs_workbench::Model; | ||
|
||
ListTerminalCommandsResult::ListTerminalCommandsResult() : | ||
ServiceResult() | ||
{} | ||
|
||
ListTerminalCommandsResult::ListTerminalCommandsResult(const std::string &payload) : | ||
ServiceResult() | ||
{ | ||
parse(payload); | ||
} | ||
|
||
ListTerminalCommandsResult::~ListTerminalCommandsResult() | ||
{} | ||
|
||
void ListTerminalCommandsResult::parse(const std::string &payload) | ||
{ | ||
Json::Reader reader; | ||
Json::Value value; | ||
reader.parse(payload, value); | ||
setRequestId(value["RequestId"].asString()); | ||
auto allTerminalCommandListNode = value["TerminalCommandList"]["TerminalCommandListItem"]; | ||
for (auto valueTerminalCommandListTerminalCommandListItem : allTerminalCommandListNode) | ||
{ | ||
TerminalCommandListItem terminalCommandListObject; | ||
if(!valueTerminalCommandListTerminalCommandListItem["CreateTime"].isNull()) | ||
terminalCommandListObject.createTime = valueTerminalCommandListTerminalCommandListItem["CreateTime"].asString(); | ||
if(!valueTerminalCommandListTerminalCommandListItem["CommandLine"].isNull()) | ||
terminalCommandListObject.commandLine = valueTerminalCommandListTerminalCommandListItem["CommandLine"].asString(); | ||
if(!valueTerminalCommandListTerminalCommandListItem["LoginUser"].isNull()) | ||
terminalCommandListObject.loginUser = valueTerminalCommandListTerminalCommandListItem["LoginUser"].asString(); | ||
if(!valueTerminalCommandListTerminalCommandListItem["ExecutePath"].isNull()) | ||
terminalCommandListObject.executePath = valueTerminalCommandListTerminalCommandListItem["ExecutePath"].asString(); | ||
terminalCommandList_.push_back(terminalCommandListObject); | ||
} | ||
if(!value["TotalCount"].isNull()) | ||
totalCount_ = std::stoi(value["TotalCount"].asString()); | ||
if(!value["PageSize"].isNull()) | ||
pageSize_ = std::stoi(value["PageSize"].asString()); | ||
if(!value["PageNumber"].isNull()) | ||
pageNumber_ = std::stoi(value["PageNumber"].asString()); | ||
|
||
} | ||
|
||
int ListTerminalCommandsResult::getTotalCount()const | ||
{ | ||
return totalCount_; | ||
} | ||
|
||
int ListTerminalCommandsResult::getPageSize()const | ||
{ | ||
return pageSize_; | ||
} | ||
|
||
int ListTerminalCommandsResult::getPageNumber()const | ||
{ | ||
return pageNumber_; | ||
} | ||
|
||
std::vector<ListTerminalCommandsResult::TerminalCommandListItem> ListTerminalCommandsResult::getTerminalCommandList()const | ||
{ | ||
return terminalCommandList_; | ||
} | ||
|