diff --git a/aliyun-java-sdk-market/ChangeLog.txt b/aliyun-java-sdk-market/ChangeLog.txt index 5031ca8207..e803ae06b6 100644 --- a/aliyun-java-sdk-market/ChangeLog.txt +++ b/aliyun-java-sdk-market/ChangeLog.txt @@ -1,3 +1,6 @@ +2023-05-29 Version: 2.0.39 +- Add DistributionProducts API. + 2023-02-22 Version: 2.0.38 - Add CrossAccountVerifyToken API. diff --git a/aliyun-java-sdk-market/pom.xml b/aliyun-java-sdk-market/pom.xml index a6e734e544..8ec9669aa8 100644 --- a/aliyun-java-sdk-market/pom.xml +++ b/aliyun-java-sdk-market/pom.xml @@ -4,7 +4,7 @@ com.aliyun aliyun-java-sdk-market jar - 2.0.38 + 2.0.39 aliyun-java-sdk-market http://www.aliyun.com Aliyun Open API SDK for Java diff --git a/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsLinkRequest.java b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsLinkRequest.java new file mode 100644 index 0000000000..0c69925f1a --- /dev/null +++ b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsLinkRequest.java @@ -0,0 +1,58 @@ +/* + * 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.market.model.v20151101; + +import com.aliyuncs.RpcAcsRequest; +import java.util.List; +import com.google.gson.Gson; +import com.google.gson.annotations.SerializedName; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.market.Endpoint; + +/** + * @author auto create + * @version + */ +public class DescribeDistributionProductsLinkRequest extends RpcAcsRequest { + + + @SerializedName("codes") + private List codes; + public DescribeDistributionProductsLinkRequest() { + super("Market", "2015-11-01", "DescribeDistributionProductsLink"); + 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 List getCodes() { + return this.codes; + } + + public void setCodes(List codes) { + this.codes = codes; + if (codes != null) { + putQueryParameter("Codes" , new Gson().toJson(codes)); + } + } + + @Override + public Class getResponseClass() { + return DescribeDistributionProductsLinkResponse.class; + } + +} diff --git a/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsLinkResponse.java b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsLinkResponse.java new file mode 100644 index 0000000000..5f2f4c415e --- /dev/null +++ b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsLinkResponse.java @@ -0,0 +1,110 @@ +/* + * 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.market.model.v20151101; + +import java.util.List; +import com.aliyuncs.AcsResponse; +import com.aliyuncs.market.transform.v20151101.DescribeDistributionProductsLinkResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class DescribeDistributionProductsLinkResponse extends AcsResponse { + + private String requestId; + + private Long totalCount; + + private Boolean success; + + private List result; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public Long getTotalCount() { + return this.totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + public Boolean getSuccess() { + return this.success; + } + + public void setSuccess(Boolean success) { + this.success = success; + } + + public List getResult() { + return this.result; + } + + public void setResult(List result) { + this.result = result; + } + + public static class Item { + + private String url; + + private String code; + + private String name; + + public String getUrl() { + return this.url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + } + + @Override + public DescribeDistributionProductsLinkResponse getInstance(UnmarshallerContext context) { + return DescribeDistributionProductsLinkResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsRequest.java b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsRequest.java new file mode 100644 index 0000000000..1d850e1bad --- /dev/null +++ b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsRequest.java @@ -0,0 +1,107 @@ +/* + * 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.market.model.v20151101; + +import com.aliyuncs.RpcAcsRequest; +import java.util.List; +import com.aliyuncs.http.MethodType; +import com.aliyuncs.market.Endpoint; + +/** + * @author auto create + * @version + */ +public class DescribeDistributionProductsRequest extends RpcAcsRequest { + + + private Long pageNumber; + + private List filters; + + private Long pageSize; + public DescribeDistributionProductsRequest() { + super("Market", "2015-11-01", "DescribeDistributionProducts"); + setMethod(MethodType.GET); + 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 Long getPageNumber() { + return this.pageNumber; + } + + public void setPageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + if(pageNumber != null){ + putQueryParameter("PageNumber", pageNumber.toString()); + } + } + + public List getFilters() { + return this.filters; + } + + public void setFilters(List filters) { + this.filters = filters; + if (filters != null) { + for (int depth1 = 0; depth1 < filters.size(); depth1++) { + putQueryParameter("Filter." + (depth1 + 1) + ".Value" , filters.get(depth1).getValue()); + putQueryParameter("Filter." + (depth1 + 1) + ".Key" , filters.get(depth1).getKey()); + } + } + } + + public Long getPageSize() { + return this.pageSize; + } + + public void setPageSize(Long pageSize) { + this.pageSize = pageSize; + if(pageSize != null){ + putQueryParameter("PageSize", pageSize.toString()); + } + } + + public static class Filter { + + private String value; + + private String key; + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + } + + @Override + public Class getResponseClass() { + return DescribeDistributionProductsResponse.class; + } + +} diff --git a/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsResponse.java b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsResponse.java new file mode 100644 index 0000000000..4213581747 --- /dev/null +++ b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/DescribeDistributionProductsResponse.java @@ -0,0 +1,230 @@ +/* + * 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.market.model.v20151101; + +import java.util.List; +import com.aliyuncs.AcsResponse; +import com.aliyuncs.market.transform.v20151101.DescribeDistributionProductsResponseUnmarshaller; +import com.aliyuncs.transform.UnmarshallerContext; + +/** + * @author auto create + * @version + */ +public class DescribeDistributionProductsResponse extends AcsResponse { + + private String requestId; + + private Integer pageNumber; + + private Integer pageSize; + + private Integer totalCount; + + private List results; + + public String getRequestId() { + return this.requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public Integer getPageNumber() { + return this.pageNumber; + } + + public void setPageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + } + + public Integer getPageSize() { + return this.pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + public Integer getTotalCount() { + return this.totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public List getResults() { + return this.results; + } + + public void setResults(List results) { + this.results = results; + } + + public static class Result { + + private String firstCategoryName; + + private String secondCategoryName; + + private String type; + + private String imageUrl; + + private String code; + + private String name; + + private String shortDescription; + + private String price; + + private String score; + + private String tradeCount; + + private String userCommentCount; + + private String submissionRadio; + + private String supplierName; + + private String supplierUId; + + public String getFirstCategoryName() { + return this.firstCategoryName; + } + + public void setFirstCategoryName(String firstCategoryName) { + this.firstCategoryName = firstCategoryName; + } + + public String getSecondCategoryName() { + return this.secondCategoryName; + } + + public void setSecondCategoryName(String secondCategoryName) { + this.secondCategoryName = secondCategoryName; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public String getImageUrl() { + return this.imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getShortDescription() { + return this.shortDescription; + } + + public void setShortDescription(String shortDescription) { + this.shortDescription = shortDescription; + } + + public String getPrice() { + return this.price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getScore() { + return this.score; + } + + public void setScore(String score) { + this.score = score; + } + + public String getTradeCount() { + return this.tradeCount; + } + + public void setTradeCount(String tradeCount) { + this.tradeCount = tradeCount; + } + + public String getUserCommentCount() { + return this.userCommentCount; + } + + public void setUserCommentCount(String userCommentCount) { + this.userCommentCount = userCommentCount; + } + + public String getSubmissionRadio() { + return this.submissionRadio; + } + + public void setSubmissionRadio(String submissionRadio) { + this.submissionRadio = submissionRadio; + } + + public String getSupplierName() { + return this.supplierName; + } + + public void setSupplierName(String supplierName) { + this.supplierName = supplierName; + } + + public String getSupplierUId() { + return this.supplierUId; + } + + public void setSupplierUId(String supplierUId) { + this.supplierUId = supplierUId; + } + } + + @Override + public DescribeDistributionProductsResponse getInstance(UnmarshallerContext context) { + return DescribeDistributionProductsResponseUnmarshaller.unmarshall(this, context); + } + + @Override + public boolean checkShowJsonItemName() { + return false; + } +} diff --git a/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/transform/v20151101/DescribeDistributionProductsLinkResponseUnmarshaller.java b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/transform/v20151101/DescribeDistributionProductsLinkResponseUnmarshaller.java new file mode 100644 index 0000000000..b1fb35c108 --- /dev/null +++ b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/transform/v20151101/DescribeDistributionProductsLinkResponseUnmarshaller.java @@ -0,0 +1,46 @@ +/* + * 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.market.transform.v20151101; + +import java.util.ArrayList; +import java.util.List; + +import com.aliyuncs.market.model.v20151101.DescribeDistributionProductsLinkResponse; +import com.aliyuncs.market.model.v20151101.DescribeDistributionProductsLinkResponse.Item; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class DescribeDistributionProductsLinkResponseUnmarshaller { + + public static DescribeDistributionProductsLinkResponse unmarshall(DescribeDistributionProductsLinkResponse describeDistributionProductsLinkResponse, UnmarshallerContext _ctx) { + + describeDistributionProductsLinkResponse.setRequestId(_ctx.stringValue("DescribeDistributionProductsLinkResponse.RequestId")); + describeDistributionProductsLinkResponse.setTotalCount(_ctx.longValue("DescribeDistributionProductsLinkResponse.TotalCount")); + describeDistributionProductsLinkResponse.setSuccess(_ctx.booleanValue("DescribeDistributionProductsLinkResponse.Success")); + + List result = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("DescribeDistributionProductsLinkResponse.Result.Length"); i++) { + Item item = new Item(); + item.setUrl(_ctx.stringValue("DescribeDistributionProductsLinkResponse.Result["+ i +"].url")); + item.setCode(_ctx.stringValue("DescribeDistributionProductsLinkResponse.Result["+ i +"].code")); + item.setName(_ctx.stringValue("DescribeDistributionProductsLinkResponse.Result["+ i +"].name")); + + result.add(item); + } + describeDistributionProductsLinkResponse.setResult(result); + + return describeDistributionProductsLinkResponse; + } +} \ No newline at end of file diff --git a/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/transform/v20151101/DescribeDistributionProductsResponseUnmarshaller.java b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/transform/v20151101/DescribeDistributionProductsResponseUnmarshaller.java new file mode 100644 index 0000000000..c46e58262a --- /dev/null +++ b/aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/transform/v20151101/DescribeDistributionProductsResponseUnmarshaller.java @@ -0,0 +1,58 @@ +/* + * 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.market.transform.v20151101; + +import java.util.ArrayList; +import java.util.List; + +import com.aliyuncs.market.model.v20151101.DescribeDistributionProductsResponse; +import com.aliyuncs.market.model.v20151101.DescribeDistributionProductsResponse.Result; +import com.aliyuncs.transform.UnmarshallerContext; + + +public class DescribeDistributionProductsResponseUnmarshaller { + + public static DescribeDistributionProductsResponse unmarshall(DescribeDistributionProductsResponse describeDistributionProductsResponse, UnmarshallerContext _ctx) { + + describeDistributionProductsResponse.setRequestId(_ctx.stringValue("DescribeDistributionProductsResponse.RequestId")); + describeDistributionProductsResponse.setPageNumber(_ctx.integerValue("DescribeDistributionProductsResponse.PageNumber")); + describeDistributionProductsResponse.setPageSize(_ctx.integerValue("DescribeDistributionProductsResponse.PageSize")); + describeDistributionProductsResponse.setTotalCount(_ctx.integerValue("DescribeDistributionProductsResponse.TotalCount")); + + List results = new ArrayList(); + for (int i = 0; i < _ctx.lengthValue("DescribeDistributionProductsResponse.Results.Length"); i++) { + Result result = new Result(); + result.setFirstCategoryName(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].FirstCategoryName")); + result.setSecondCategoryName(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].SecondCategoryName")); + result.setType(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].Type")); + result.setImageUrl(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].ImageUrl")); + result.setCode(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].Code")); + result.setName(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].Name")); + result.setShortDescription(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].ShortDescription")); + result.setPrice(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].Price")); + result.setScore(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].Score")); + result.setTradeCount(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].TradeCount")); + result.setUserCommentCount(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].UserCommentCount")); + result.setSubmissionRadio(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].SubmissionRadio")); + result.setSupplierName(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].SupplierName")); + result.setSupplierUId(_ctx.stringValue("DescribeDistributionProductsResponse.Results["+ i +"].SupplierUId")); + + results.add(result); + } + describeDistributionProductsResponse.setResults(results); + + return describeDistributionProductsResponse; + } +} \ No newline at end of file