Skip to content

Commit

Permalink
Add DistributionProducts API.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed May 29, 2023
1 parent 64dbcca commit f63272f
Show file tree
Hide file tree
Showing 8 changed files with 613 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aliyun-java-sdk-market/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-05-29 Version: 2.0.39
- Add DistributionProducts API.

2023-02-22 Version: 2.0.38
- Add CrossAccountVerifyToken API.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-java-sdk-market/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-market</artifactId>
<packaging>jar</packaging>
<version>2.0.38</version>
<version>2.0.39</version>
<name>aliyun-java-sdk-market</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
@@ -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<DescribeDistributionProductsLinkResponse> {


@SerializedName("codes")
private List<String> 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<String> getCodes() {
return this.codes;
}

public void setCodes(List<String> codes) {
this.codes = codes;
if (codes != null) {
putQueryParameter("Codes" , new Gson().toJson(codes));
}
}

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

}
Original file line number Diff line number Diff line change
@@ -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<Item> 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<Item> getResult() {
return this.result;
}

public void setResult(List<Item> 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;
}
}
Original file line number Diff line number Diff line change
@@ -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<DescribeDistributionProductsResponse> {


private Long pageNumber;

private List<Filter> 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<Filter> getFilters() {
return this.filters;
}

public void setFilters(List<Filter> 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<DescribeDistributionProductsResponse> getResponseClass() {
return DescribeDistributionProductsResponse.class;
}

}
Loading

0 comments on commit f63272f

Please sign in to comment.