Skip to content

Commit

Permalink
Add fabric v2 chaincode apis.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Oct 10, 2023
1 parent c0e6282 commit f38aa0e
Show file tree
Hide file tree
Showing 9 changed files with 275 additions and 4 deletions.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-baas/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-10-10 Version: 2.2.3
- Add fabric v2 chaincode apis.

2022-03-01 Version: 2.2.2
- Add fabric v2 chaincode apis.

Expand Down
7 changes: 3 additions & 4 deletions aliyun-java-sdk-baas/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-baas</artifactId>
<packaging>jar</packaging>
<version>2.2.2</version>
<version>2.2.3</version>
<name>aliyun-java-sdk-baas</name>
<url>http://www.aliyun.com</url>
<description>Aliyun Open API SDK for Java
Expand Down Expand Up @@ -37,9 +37,8 @@ http://www.aliyun.com</description>
</dependencies>
<licenses>
<license>
<name/>
<url/>
<distribution/>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* 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.
*/

package com.aliyuncs.baas.model.v20181221;

import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.baas.Endpoint;

/**
* @author auto create
* @version
*/
public class CreateAntChainKmsAccountNewRequest extends RpcAcsRequest<CreateAntChainKmsAccountNewResponse> {


private String antChainId;

private String account;
public CreateAntChainKmsAccountNewRequest() {
super("Baas", "2018-12-21", "CreateAntChainKmsAccountNew", "baas");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}

public String getAntChainId() {
return this.antChainId;
}

public void setAntChainId(String antChainId) {
this.antChainId = antChainId;
if(antChainId != null){
putBodyParameter("AntChainId", antChainId);
}
}

public String getAccount() {
return this.account;
}

public void setAccount(String account) {
this.account = account;
if(account != null){
putBodyParameter("Account", account);
}
}

@Override
public Class<CreateAntChainKmsAccountNewResponse> getResponseClass() {
return CreateAntChainKmsAccountNewResponse.class;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/*
* 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.
*/

package com.aliyuncs.baas.model.v20181221;

import com.aliyuncs.AcsResponse;
import com.aliyuncs.baas.transform.v20181221.CreateAntChainKmsAccountNewResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;

/**
* @author auto create
* @version
*/
public class CreateAntChainKmsAccountNewResponse extends AcsResponse {

private String httpStatusCode;

private String requestId;

private Boolean success;

private String resultMessage;

private String code;

private String message;

private String resultCode;

private Result result;

public String getHttpStatusCode() {
return this.httpStatusCode;
}

public void setHttpStatusCode(String httpStatusCode) {
this.httpStatusCode = httpStatusCode;
}

public String getRequestId() {
return this.requestId;
}

public void setRequestId(String requestId) {
this.requestId = requestId;
}

public Boolean getSuccess() {
return this.success;
}

public void setSuccess(Boolean success) {
this.success = success;
}

public String getResultMessage() {
return this.resultMessage;
}

public void setResultMessage(String resultMessage) {
this.resultMessage = resultMessage;
}

public String getCode() {
return this.code;
}

public void setCode(String code) {
this.code = code;
}

public String getMessage() {
return this.message;
}

public void setMessage(String message) {
this.message = message;
}

public String getResultCode() {
return this.resultCode;
}

public void setResultCode(String resultCode) {
this.resultCode = resultCode;
}

public Result getResult() {
return this.result;
}

public void setResult(Result result) {
this.result = result;
}

public static class Result {

private String pubKey;

private String myKmsKeyId;

public String getPubKey() {
return this.pubKey;
}

public void setPubKey(String pubKey) {
this.pubKey = pubKey;
}

public String getMyKmsKeyId() {
return this.myKmsKeyId;
}

public void setMyKmsKeyId(String myKmsKeyId) {
this.myKmsKeyId = myKmsKeyId;
}
}

@Override
public CreateAntChainKmsAccountNewResponse getInstance(UnmarshallerContext context) {
return CreateAntChainKmsAccountNewResponseUnmarshaller.unmarshall(this, context);
}

@Override
public boolean checkShowJsonItemName() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public static class ResultItem {

private String consortiumName;

private String majorVersion;

private List<TagsItem> tags;

public Integer getChannelCount() {
Expand Down Expand Up @@ -239,6 +241,14 @@ public void setConsortiumName(String consortiumName) {
this.consortiumName = consortiumName;
}

public String getMajorVersion() {
return this.majorVersion;
}

public void setMajorVersion(String majorVersion) {
this.majorVersion = majorVersion;
}

public List<TagsItem> getTags() {
return this.tags;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public static class ResultItem {

private String organizationName;

private String majorVersion;

private List<TagsItem> tags;

public String getDomain() {
Expand Down Expand Up @@ -239,6 +241,14 @@ public void setOrganizationName(String organizationName) {
this.organizationName = organizationName;
}

public String getMajorVersion() {
return this.majorVersion;
}

public void setMajorVersion(String majorVersion) {
this.majorVersion = majorVersion;
}

public List<TagsItem> getTags() {
return this.tags;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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.
*/

package com.aliyuncs.baas.transform.v20181221;

import com.aliyuncs.baas.model.v20181221.CreateAntChainKmsAccountNewResponse;
import com.aliyuncs.baas.model.v20181221.CreateAntChainKmsAccountNewResponse.Result;
import com.aliyuncs.transform.UnmarshallerContext;


public class CreateAntChainKmsAccountNewResponseUnmarshaller {

public static CreateAntChainKmsAccountNewResponse unmarshall(CreateAntChainKmsAccountNewResponse createAntChainKmsAccountNewResponse, UnmarshallerContext _ctx) {

createAntChainKmsAccountNewResponse.setRequestId(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.RequestId"));
createAntChainKmsAccountNewResponse.setHttpStatusCode(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.HttpStatusCode"));
createAntChainKmsAccountNewResponse.setSuccess(_ctx.booleanValue("CreateAntChainKmsAccountNewResponse.Success"));
createAntChainKmsAccountNewResponse.setResultMessage(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.ResultMessage"));
createAntChainKmsAccountNewResponse.setCode(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.Code"));
createAntChainKmsAccountNewResponse.setMessage(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.Message"));
createAntChainKmsAccountNewResponse.setResultCode(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.ResultCode"));

Result result = new Result();
result.setPubKey(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.Result.PubKey"));
result.setMyKmsKeyId(_ctx.stringValue("CreateAntChainKmsAccountNewResponse.Result.MyKmsKeyId"));
createAntChainKmsAccountNewResponse.setResult(result);

return createAntChainKmsAccountNewResponse;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static DescribeFabricConsortiumsResponse unmarshall(DescribeFabricConsort
resultItem.setExpiredTime(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result["+ i +"].ExpiredTime"));
resultItem.setOrganizationCount(_ctx.integerValue("DescribeFabricConsortiumsResponse.Result["+ i +"].OrganizationCount"));
resultItem.setConsortiumName(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result["+ i +"].ConsortiumName"));
resultItem.setMajorVersion(_ctx.stringValue("DescribeFabricConsortiumsResponse.Result["+ i +"].MajorVersion"));

List<TagsItem> tags = new ArrayList<TagsItem>();
for (int j = 0; j < _ctx.lengthValue("DescribeFabricConsortiumsResponse.Result["+ i +"].Tags.Length"); j++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static DescribeFabricOrganizationsResponse unmarshall(DescribeFabricOrgan
resultItem.setZoneId(_ctx.stringValue("DescribeFabricOrganizationsResponse.Result["+ i +"].ZoneId"));
resultItem.setUserCount(_ctx.integerValue("DescribeFabricOrganizationsResponse.Result["+ i +"].UserCount"));
resultItem.setOrganizationName(_ctx.stringValue("DescribeFabricOrganizationsResponse.Result["+ i +"].OrganizationName"));
resultItem.setMajorVersion(_ctx.stringValue("DescribeFabricOrganizationsResponse.Result["+ i +"].MajorVersion"));

List<TagsItem> tags = new ArrayList<TagsItem>();
for (int j = 0; j < _ctx.lengthValue("DescribeFabricOrganizationsResponse.Result["+ i +"].Tags.Length"); j++) {
Expand Down

0 comments on commit f38aa0e

Please sign in to comment.