All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyuncs.cbn.model.v20170912.CreateTrafficMarkingPolicyRequest Maven / Gradle / Ivy

Go to download

Aliyun Open API SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com

There is a newer version: 1.0.40
Show newest version
/*
 * 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.cbn.model.v20170912;

import com.aliyuncs.RpcAcsRequest;
import java.util.List;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.cbn.Endpoint;

/**
 * @author auto create
 * @version 
 */
public class CreateTrafficMarkingPolicyRequest extends RpcAcsRequest {
	   

	private Long resourceOwnerId;

	private String clientToken;

	private String trafficMarkingPolicyDescription;

	private String trafficMarkingPolicyName;

	private Boolean dryRun;

	private List trafficMatchRuless;

	private String resourceOwnerAccount;

	private String ownerAccount;

	private Long ownerId;

	private String transitRouterId;

	private Integer priority;

	private Integer markingDscp;
	public CreateTrafficMarkingPolicyRequest() {
		super("Cbn", "2017-09-12", "CreateTrafficMarkingPolicy");
		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 Long getResourceOwnerId() {
		return this.resourceOwnerId;
	}

	public void setResourceOwnerId(Long resourceOwnerId) {
		this.resourceOwnerId = resourceOwnerId;
		if(resourceOwnerId != null){
			putQueryParameter("ResourceOwnerId", resourceOwnerId.toString());
		}
	}

	public String getClientToken() {
		return this.clientToken;
	}

	public void setClientToken(String clientToken) {
		this.clientToken = clientToken;
		if(clientToken != null){
			putQueryParameter("ClientToken", clientToken);
		}
	}

	public String getTrafficMarkingPolicyDescription() {
		return this.trafficMarkingPolicyDescription;
	}

	public void setTrafficMarkingPolicyDescription(String trafficMarkingPolicyDescription) {
		this.trafficMarkingPolicyDescription = trafficMarkingPolicyDescription;
		if(trafficMarkingPolicyDescription != null){
			putQueryParameter("TrafficMarkingPolicyDescription", trafficMarkingPolicyDescription);
		}
	}

	public String getTrafficMarkingPolicyName() {
		return this.trafficMarkingPolicyName;
	}

	public void setTrafficMarkingPolicyName(String trafficMarkingPolicyName) {
		this.trafficMarkingPolicyName = trafficMarkingPolicyName;
		if(trafficMarkingPolicyName != null){
			putQueryParameter("TrafficMarkingPolicyName", trafficMarkingPolicyName);
		}
	}

	public Boolean getDryRun() {
		return this.dryRun;
	}

	public void setDryRun(Boolean dryRun) {
		this.dryRun = dryRun;
		if(dryRun != null){
			putQueryParameter("DryRun", dryRun.toString());
		}
	}

	public List getTrafficMatchRuless() {
		return this.trafficMatchRuless;
	}

	public void setTrafficMatchRuless(List trafficMatchRuless) {
		this.trafficMatchRuless = trafficMatchRuless;	
		if (trafficMatchRuless != null) {
			for (int depth1 = 0; depth1 < trafficMatchRuless.size(); depth1++) {
				if (trafficMatchRuless.get(depth1).getDstPortRanges() != null) {
					for (int i = 0; i < trafficMatchRuless.get(depth1).getDstPortRanges().size(); i++) {
						putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".DstPortRange." + (i + 1) , trafficMatchRuless.get(depth1).getDstPortRanges().get(i));
					}
				}
				putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".MatchDscp" , trafficMatchRuless.get(depth1).getMatchDscp());
				putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".Protocol" , trafficMatchRuless.get(depth1).getBizProtocol());
				putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".TrafficMatchRuleDescription" , trafficMatchRuless.get(depth1).getTrafficMatchRuleDescription());
				if (trafficMatchRuless.get(depth1).getSrcPortRanges() != null) {
					for (int i = 0; i < trafficMatchRuless.get(depth1).getSrcPortRanges().size(); i++) {
						putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".SrcPortRange." + (i + 1) , trafficMatchRuless.get(depth1).getSrcPortRanges().get(i));
					}
				}
				putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".DstCidr" , trafficMatchRuless.get(depth1).getDstCidr());
				putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".TrafficMatchRuleName" , trafficMatchRuless.get(depth1).getTrafficMatchRuleName());
				putQueryParameter("TrafficMatchRules." + (depth1 + 1) + ".SrcCidr" , trafficMatchRuless.get(depth1).getSrcCidr());
			}
		}	
	}

	public String getResourceOwnerAccount() {
		return this.resourceOwnerAccount;
	}

	public void setResourceOwnerAccount(String resourceOwnerAccount) {
		this.resourceOwnerAccount = resourceOwnerAccount;
		if(resourceOwnerAccount != null){
			putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
		}
	}

	public String getOwnerAccount() {
		return this.ownerAccount;
	}

	public void setOwnerAccount(String ownerAccount) {
		this.ownerAccount = ownerAccount;
		if(ownerAccount != null){
			putQueryParameter("OwnerAccount", ownerAccount);
		}
	}

	public Long getOwnerId() {
		return this.ownerId;
	}

	public void setOwnerId(Long ownerId) {
		this.ownerId = ownerId;
		if(ownerId != null){
			putQueryParameter("OwnerId", ownerId.toString());
		}
	}

	public String getTransitRouterId() {
		return this.transitRouterId;
	}

	public void setTransitRouterId(String transitRouterId) {
		this.transitRouterId = transitRouterId;
		if(transitRouterId != null){
			putQueryParameter("TransitRouterId", transitRouterId);
		}
	}

	public Integer getPriority() {
		return this.priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
		if(priority != null){
			putQueryParameter("Priority", priority.toString());
		}
	}

	public Integer getMarkingDscp() {
		return this.markingDscp;
	}

	public void setMarkingDscp(Integer markingDscp) {
		this.markingDscp = markingDscp;
		if(markingDscp != null){
			putQueryParameter("MarkingDscp", markingDscp.toString());
		}
	}

	public static class TrafficMatchRules {

		private List dstPortRanges;

		private Integer matchDscp;

		private String protocol;

		private String trafficMatchRuleDescription;

		private List srcPortRanges;

		private String dstCidr;

		private String trafficMatchRuleName;

		private String srcCidr;

		public List getDstPortRanges() {
			return this.dstPortRanges;
		}

		public void setDstPortRanges(List dstPortRanges) {
			this.dstPortRanges = dstPortRanges;
		}

		public Integer getMatchDscp() {
			return this.matchDscp;
		}

		public void setMatchDscp(Integer matchDscp) {
			this.matchDscp = matchDscp;
		}

		public String getBizProtocol() {
			return this.protocol;
		}

		public void setBizProtocol(String protocol) {
			this.protocol = protocol;
		}

		public String getTrafficMatchRuleDescription() {
			return this.trafficMatchRuleDescription;
		}

		public void setTrafficMatchRuleDescription(String trafficMatchRuleDescription) {
			this.trafficMatchRuleDescription = trafficMatchRuleDescription;
		}

		public List getSrcPortRanges() {
			return this.srcPortRanges;
		}

		public void setSrcPortRanges(List srcPortRanges) {
			this.srcPortRanges = srcPortRanges;
		}

		public String getDstCidr() {
			return this.dstCidr;
		}

		public void setDstCidr(String dstCidr) {
			this.dstCidr = dstCidr;
		}

		public String getTrafficMatchRuleName() {
			return this.trafficMatchRuleName;
		}

		public void setTrafficMatchRuleName(String trafficMatchRuleName) {
			this.trafficMatchRuleName = trafficMatchRuleName;
		}

		public String getSrcCidr() {
			return this.srcCidr;
		}

		public void setSrcCidr(String srcCidr) {
			this.srcCidr = srcCidr;
		}
	}

	@Override
	public Class getResponseClass() {
		return CreateTrafficMarkingPolicyResponse.class;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy