Skip to content

Commit

Permalink
Supported connector visualization manage.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Aug 31, 2023
1 parent f17e3c1 commit e1a266e
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-csas/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-08-31 Version: 1.0.3
- Supported connector visualization manage.

2023-08-24 Version: 1.0.2
- Supported recommand serialization format flat.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-csas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-csas</artifactId>
<packaging>jar</packaging>
<version>1.0.2</version>
<version>1.0.3</version>
<name>aliyun-java-sdk-csas</name>
<url>http://www.aliyun.com</url>
<description>Aliyun Open API SDK for Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public static class Application {

private List<String> policyIds;

private List<String> connectorIds;

public String getApplicationId() {
return this.applicationId;
}
Expand Down Expand Up @@ -147,6 +149,14 @@ public void setPolicyIds(List<String> policyIds) {
this.policyIds = policyIds;
}

public List<String> getConnectorIds() {
return this.connectorIds;
}

public void setConnectorIds(List<String> connectorIds) {
this.connectorIds = connectorIds;
}

public static class PortRange {

private Integer begin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public static class Connector {

private List<Application> applications;

private List<ConnectorClient> connectorClients;

private UpgradeTime upgradeTime;

public String getConnectorId() {
Expand Down Expand Up @@ -129,6 +131,14 @@ public void setApplications(List<Application> applications) {
this.applications = applications;
}

public List<ConnectorClient> getConnectorClients() {
return this.connectorClients;
}

public void setConnectorClients(List<ConnectorClient> connectorClients) {
this.connectorClients = connectorClients;
}

public UpgradeTime getUpgradeTime() {
return this.upgradeTime;
}
Expand Down Expand Up @@ -160,6 +170,49 @@ public void setApplicationName(String applicationName) {
}
}

public static class ConnectorClient {

private String devTag;

private String hostname;

private String connectionStatus;

private String publicIp;

public String getDevTag() {
return this.devTag;
}

public void setDevTag(String devTag) {
this.devTag = devTag;
}

public String getHostname() {
return this.hostname;
}

public void setHostname(String hostname) {
this.hostname = hostname;
}

public String getConnectionStatus() {
return this.connectionStatus;
}

public void setConnectionStatus(String connectionStatus) {
this.connectionStatus = connectionStatus;
}

public String getPublicIp() {
return this.publicIp;
}

public void setPublicIp(String publicIp) {
this.publicIp = publicIp;
}
}

public static class UpgradeTime {

private String start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class ListPrivateAccessApplicationsRequest extends RpcAcsRequest<ListPriv

private String tagId;

private String connectorId;

private Integer currentPage;

private List<String> applicationIds;
Expand Down Expand Up @@ -89,6 +91,17 @@ public void setTagId(String tagId) {
}
}

public String getConnectorId() {
return this.connectorId;
}

public void setConnectorId(String connectorId) {
this.connectorId = connectorId;
if(connectorId != null){
putQueryParameter("ConnectorId", connectorId);
}
}

public Integer getCurrentPage() {
return this.currentPage;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public static class Application {

private List<String> policyIds;

private List<String> connectorIds;

public String getApplicationId() {
return this.applicationId;
}
Expand Down Expand Up @@ -157,6 +159,14 @@ public void setPolicyIds(List<String> policyIds) {
this.policyIds = policyIds;
}

public List<String> getConnectorIds() {
return this.connectorIds;
}

public void setConnectorIds(List<String> connectorIds) {
this.connectorIds = connectorIds;
}

public static class PortRange {

private Integer begin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ public static GetPrivateAccessApplicationResponse unmarshall(GetPrivateAccessApp
}
application.setPolicyIds(policyIds);

List<String> connectorIds = new ArrayList<String>();
for (int i = 0; i < _ctx.lengthValue("GetPrivateAccessApplicationResponse.Application.ConnectorIds.Length"); i++) {
connectorIds.add(_ctx.stringValue("GetPrivateAccessApplicationResponse.Application.ConnectorIds["+ i +"]"));
}
application.setConnectorIds(connectorIds);

List<PortRange> portRanges = new ArrayList<PortRange>();
for (int i = 0; i < _ctx.lengthValue("GetPrivateAccessApplicationResponse.Application.PortRanges.Length"); i++) {
PortRange portRange = new PortRange();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.aliyuncs.csas.model.v20230120.ListConnectorsResponse;
import com.aliyuncs.csas.model.v20230120.ListConnectorsResponse.Connector;
import com.aliyuncs.csas.model.v20230120.ListConnectorsResponse.Connector.Application;
import com.aliyuncs.csas.model.v20230120.ListConnectorsResponse.Connector.ConnectorClient;
import com.aliyuncs.csas.model.v20230120.ListConnectorsResponse.Connector.UpgradeTime;
import com.aliyuncs.transform.UnmarshallerContext;

Expand Down Expand Up @@ -56,6 +57,18 @@ public static ListConnectorsResponse unmarshall(ListConnectorsResponse listConne
}
connector.setApplications(applications);

List<ConnectorClient> connectorClients = new ArrayList<ConnectorClient>();
for (int j = 0; j < _ctx.lengthValue("ListConnectorsResponse.Connectors["+ i +"].ConnectorClients.Length"); j++) {
ConnectorClient connectorClient = new ConnectorClient();
connectorClient.setDevTag(_ctx.stringValue("ListConnectorsResponse.Connectors["+ i +"].ConnectorClients["+ j +"].DevTag"));
connectorClient.setHostname(_ctx.stringValue("ListConnectorsResponse.Connectors["+ i +"].ConnectorClients["+ j +"].Hostname"));
connectorClient.setConnectionStatus(_ctx.stringValue("ListConnectorsResponse.Connectors["+ i +"].ConnectorClients["+ j +"].ConnectionStatus"));
connectorClient.setPublicIp(_ctx.stringValue("ListConnectorsResponse.Connectors["+ i +"].ConnectorClients["+ j +"].PublicIp"));

connectorClients.add(connectorClient);
}
connector.setConnectorClients(connectorClients);

connectors.add(connector);
}
listConnectorsResponse.setConnectors(connectors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public static ListPrivateAccessApplicationsResponse unmarshall(ListPrivateAccess
}
application.setPolicyIds(policyIds);

List<String> connectorIds = new ArrayList<String>();
for (int j = 0; j < _ctx.lengthValue("ListPrivateAccessApplicationsResponse.Applications["+ i +"].ConnectorIds.Length"); j++) {
connectorIds.add(_ctx.stringValue("ListPrivateAccessApplicationsResponse.Applications["+ i +"].ConnectorIds["+ j +"]"));
}
application.setConnectorIds(connectorIds);

List<PortRange> portRanges = new ArrayList<PortRange>();
for (int j = 0; j < _ctx.lengthValue("ListPrivateAccessApplicationsResponse.Applications["+ i +"].PortRanges.Length"); j++) {
PortRange portRange = new PortRange();
Expand Down

0 comments on commit e1a266e

Please sign in to comment.