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

com.aliyun.sdk.service.cbn20170912.models.AddTrafficMatchRuleToTrafficMarkingPolicyRequest Maven / Gradle / Ivy

// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.cbn20170912.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * {@link AddTrafficMatchRuleToTrafficMarkingPolicyRequest} extends {@link RequestModel}
 *
 * 

AddTrafficMatchRuleToTrafficMarkingPolicyRequest

*/ public class AddTrafficMatchRuleToTrafficMarkingPolicyRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ClientToken") private String clientToken; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DryRun") private Boolean dryRun; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerAccount") private String ownerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerId") private Long resourceOwnerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("TrafficMarkingPolicyId") @com.aliyun.core.annotation.Validation(required = true) private String trafficMarkingPolicyId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("TrafficMatchRules") private java.util.List < TrafficMatchRules> trafficMatchRules; private AddTrafficMatchRuleToTrafficMarkingPolicyRequest(Builder builder) { super(builder); this.clientToken = builder.clientToken; this.dryRun = builder.dryRun; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.trafficMarkingPolicyId = builder.trafficMarkingPolicyId; this.trafficMatchRules = builder.trafficMatchRules; } public static Builder builder() { return new Builder(); } public static AddTrafficMatchRuleToTrafficMarkingPolicyRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return clientToken */ public String getClientToken() { return this.clientToken; } /** * @return dryRun */ public Boolean getDryRun() { return this.dryRun; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } /** * @return trafficMarkingPolicyId */ public String getTrafficMarkingPolicyId() { return this.trafficMarkingPolicyId; } /** * @return trafficMatchRules */ public java.util.List < TrafficMatchRules> getTrafficMatchRules() { return this.trafficMatchRules; } public static final class Builder extends Request.Builder { private String clientToken; private Boolean dryRun; private String ownerAccount; private Long ownerId; private String resourceOwnerAccount; private Long resourceOwnerId; private String trafficMarkingPolicyId; private java.util.List < TrafficMatchRules> trafficMatchRules; private Builder() { super(); } private Builder(AddTrafficMatchRuleToTrafficMarkingPolicyRequest request) { super(request); this.clientToken = request.clientToken; this.dryRun = request.dryRun; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.trafficMarkingPolicyId = request.trafficMarkingPolicyId; this.trafficMatchRules = request.trafficMatchRules; } /** * The client token that is used to ensure the idempotence of the request. *

* * You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters. * * > If you do not set this parameter, **ClientToken** is set to the value of **RequestId**. The value of **RequestId** for each API request may be different. */ public Builder clientToken(String clientToken) { this.putQueryParameter("ClientToken", clientToken); this.clientToken = clientToken; return this; } /** * Specifies whether to perform a dry run. Valid values: *

* * * **true**: performs a dry run. The system checks the required parameters, request format, and limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * * **false** (default): performs a dry run and sends the request. */ public Builder dryRun(Boolean dryRun) { this.putQueryParameter("DryRun", dryRun); this.dryRun = dryRun; return this; } /** * OwnerAccount. */ public Builder ownerAccount(String ownerAccount) { this.putQueryParameter("OwnerAccount", ownerAccount); this.ownerAccount = ownerAccount; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** * ResourceOwnerId. */ public Builder resourceOwnerId(Long resourceOwnerId) { this.putQueryParameter("ResourceOwnerId", resourceOwnerId); this.resourceOwnerId = resourceOwnerId; return this; } /** * The ID of the traffic marking policy. */ public Builder trafficMarkingPolicyId(String trafficMarkingPolicyId) { this.putQueryParameter("TrafficMarkingPolicyId", trafficMarkingPolicyId); this.trafficMarkingPolicyId = trafficMarkingPolicyId; return this; } /** * The traffic classification rules. *

* * You can add at most 50 traffic classification rules in each call. */ public Builder trafficMatchRules(java.util.List < TrafficMatchRules> trafficMatchRules) { this.putQueryParameter("TrafficMatchRules", trafficMatchRules); this.trafficMatchRules = trafficMatchRules; return this; } @Override public AddTrafficMatchRuleToTrafficMarkingPolicyRequest build() { return new AddTrafficMatchRuleToTrafficMarkingPolicyRequest(this); } } public static class TrafficMatchRules extends TeaModel { @com.aliyun.core.annotation.NameInMap("DstCidr") private String dstCidr; @com.aliyun.core.annotation.NameInMap("DstPortRange") private java.util.List < Integer > dstPortRange; @com.aliyun.core.annotation.NameInMap("MatchDscp") private Integer matchDscp; @com.aliyun.core.annotation.NameInMap("Protocol") private String protocol; @com.aliyun.core.annotation.NameInMap("SrcCidr") private String srcCidr; @com.aliyun.core.annotation.NameInMap("SrcPortRange") private java.util.List < Integer > srcPortRange; @com.aliyun.core.annotation.NameInMap("TrafficMatchRuleDescription") private String trafficMatchRuleDescription; @com.aliyun.core.annotation.NameInMap("TrafficMatchRuleName") private String trafficMatchRuleName; private TrafficMatchRules(Builder builder) { this.dstCidr = builder.dstCidr; this.dstPortRange = builder.dstPortRange; this.matchDscp = builder.matchDscp; this.protocol = builder.protocol; this.srcCidr = builder.srcCidr; this.srcPortRange = builder.srcPortRange; this.trafficMatchRuleDescription = builder.trafficMatchRuleDescription; this.trafficMatchRuleName = builder.trafficMatchRuleName; } public static Builder builder() { return new Builder(); } public static TrafficMatchRules create() { return builder().build(); } /** * @return dstCidr */ public String getDstCidr() { return this.dstCidr; } /** * @return dstPortRange */ public java.util.List < Integer > getDstPortRange() { return this.dstPortRange; } /** * @return matchDscp */ public Integer getMatchDscp() { return this.matchDscp; } /** * @return protocol */ public String getProtocol() { return this.protocol; } /** * @return srcCidr */ public String getSrcCidr() { return this.srcCidr; } /** * @return srcPortRange */ public java.util.List < Integer > getSrcPortRange() { return this.srcPortRange; } /** * @return trafficMatchRuleDescription */ public String getTrafficMatchRuleDescription() { return this.trafficMatchRuleDescription; } /** * @return trafficMatchRuleName */ public String getTrafficMatchRuleName() { return this.trafficMatchRuleName; } public static final class Builder { private String dstCidr; private java.util.List < Integer > dstPortRange; private Integer matchDscp; private String protocol; private String srcCidr; private java.util.List < Integer > srcPortRange; private String trafficMatchRuleDescription; private String trafficMatchRuleName; /** * The destination CIDR block that is used to match packets. *

* * Packets whose destination IP addresses fall into the specified destination CIDR block are considered a match. If you do not specify a destination CIDR block, packets are considered a match regardless of the destination IP address. */ public Builder dstCidr(String dstCidr) { this.dstCidr = dstCidr; return this; } /** * The destination port range that is used to match packets. Valid values: **-1** and **1** to **65535**. *

* * Packets whose destination ports fall into the specified destination port range are considered a match. If you do not specify destination port range, packets are considered a match regardless of the destination port. * * You can specify at most two port numbers for this parameter. Take note of the following rules: * * * If you enter only one port number, such as 1, packets whose destination port is 1 are considered a match. * * If you enter two port numbers, such as 1 and 200, packets whose destination ports fall into 1 and 200 are considered a match. * * If you enter two port numbers and one of them is -1, the other port must also be -1. In this case, packets are considered a match regardless of the destination port. */ public Builder dstPortRange(java.util.List < Integer > dstPortRange) { this.dstPortRange = dstPortRange; return this; } /** * The Differentiated Services Code Point (DSCP) value that is used to match packets. Valid values: **0** to **63**. *

* * Packets that carry the specified DSCP value are considered a match. If you do not specify a DSCP value, packets are considered a match regardless of the DSCP value. * * > The DSCP value that you specify for this parameter is the DSCP value that packets carry before they are transmitted over the inter-region connection. */ public Builder matchDscp(Integer matchDscp) { this.matchDscp = matchDscp; return this; } /** * The protocol that is used to match packets. *

* * Traffic classification rules support the following protocols: **HTTP**, **HTTPS**, **TCP**, **UDP**, **SSH**, and **Telnet**. For more information, log on to the [Cloud Enterprise Network (CEN) console](https://cen.console.aliyun.com/cen/list). * * **Some protocols use a specific port. Click to view protocols and ports.** * * * If the protocol is **ICMP**, set the destination port to **-1**. * * If the protocol is **GRE**, set the destination port to **-1**. * * If the protocol is **SSH**, set the destination port to **22**. * * If the protocol is **Telnet**, set the destination port to **23**. * * If the protocol is **HTTP**, set the destination port to **80**. * * If the protocol is **HTTPS**, set the destination port to **443**. * * If the protocol is **MS SQL**, set the destination port to **1443**. * * If the protocol is **Oracle**, set the destination port to **1521**. * * If the protocol is **Mysql**, set the destination port to **3306**. * * If the protocol is **RDP**, set the destination port to **3389**. * * If the protocol is **Postgre SQL**, set the destination port to **5432**. * * If the protocol is **Redis**, set the destination port to **6379**. */ public Builder protocol(String protocol) { this.protocol = protocol; return this; } /** * The source CIDR block that is used to match packets. *

* * Packets whose source IP addresses fall into the specified source CIDR block are considered a match. If you do not specify a source CIDR block, packets are considered a match regardless of the source IP address. */ public Builder srcCidr(String srcCidr) { this.srcCidr = srcCidr; return this; } /** * The source port range that is used to match packets. Valid values: **-1** and **1** to **65535**. *

* * Packets whose source ports fall into the specified source port range are considered a match. If you do not specify a source port range, packets are considered a match regardless of the source port. * * You can enter at most two port numbers. Take note of the following rules: * * * If you enter only one port number, such as 1, packets whose source port is 1 are considered a match. * * If you enter two port numbers, such as 1 and 200, packets whose source ports fall into 1 and 200 are considered a match. * * If you enter two port numbers and one of them is -1, the other port number must also be -1. In this case, packets are considered a match regardless of the source port. */ public Builder srcPortRange(java.util.List < Integer > srcPortRange) { this.srcPortRange = srcPortRange; return this; } /** * The description of the traffic classification rule. *

* * This parameter is optional. If you enter a description, it must be 1 to 256 characters in length, and cannot start with http:// or https://. */ public Builder trafficMatchRuleDescription(String trafficMatchRuleDescription) { this.trafficMatchRuleDescription = trafficMatchRuleDescription; return this; } /** * The name of the traffic classification rule. *

* * The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://. */ public Builder trafficMatchRuleName(String trafficMatchRuleName) { this.trafficMatchRuleName = trafficMatchRuleName; return this; } public TrafficMatchRules build() { return new TrafficMatchRules(this); } } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy