com.tencentcloudapi.teo.v20220901.models.ApplicationProxyRule Maven / Gradle / Ivy
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* 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.tencentcloudapi.teo.v20220901.models;
import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ApplicationProxyRule extends AbstractModel {
/**
* The protocol. Values:
`TCP`: TCP protocol.
`UDP`: UDP protocol.
*/
@SerializedName("Proto")
@Expose
private String Proto;
/**
* The access port, which can be:
A single port, such as 80
A port range, such as 81-82
Note that each rule can have up to 20 ports.
*/
@SerializedName("Port")
@Expose
private String [] Port;
/**
* The origin type. Values:
`custom`: Specified origins
`origins`: Origin group
*/
@SerializedName("OriginType")
@Expose
private String OriginType;
/**
* Origin server information:
When `OriginType=custom`, it indicates one or more origin servers, such as ["8.8.8.8","9.9.9.9"] or ["test.com"].
When `OriginType=origins`, it indicates an origin group ID, such as ["origin-537f5b41-162a-11ed-abaa-525400c5da15"].
*/
@SerializedName("OriginValue")
@Expose
private String [] OriginValue;
/**
* The rule ID.
*/
@SerializedName("RuleId")
@Expose
private String RuleId;
/**
* The rule status. Values:
`online`: Enabled.
`offline`: Disabled.
`progress`: Deploying
`stopping`: Disabling
`fail`: Failed to deploy or disable
*/
@SerializedName("Status")
@Expose
private String Status;
/**
* Passes the client IP. Values:
`TOA`: Pass the client IP via TOA (available only when `Proto=TCP`).
`PPV1`: Pass the client IP via Proxy Protocol V1 (available only when `Proto=TCP`).
`PPV2`: Pass the client IP via Proxy Protocol V2.
`OFF`: Not pass the client IP. Default value: OFF.
*/
@SerializedName("ForwardClientIp")
@Expose
private String ForwardClientIp;
/**
* Whether to enable session persistence. Values:
`true`: Enable
`false`: Disable Default value: false
*/
@SerializedName("SessionPersist")
@Expose
private Boolean SessionPersist;
/**
* Duration for the persistent session. The value takes effect only when `SessionPersist = true`.
Note: u200dThis field may return null, indicating that no valid values can be obtained.
*/
@SerializedName("SessionPersistTime")
@Expose
private Long SessionPersistTime;
/**
* The origin port, which can be:
A single port, such as 80
A port range, such as 81-82
*/
@SerializedName("OriginPort")
@Expose
private String OriginPort;
/**
* Rule tag.
Note: This field may return·`null`, indicating that no valid values can be obtained.
*/
@SerializedName("RuleTag")
@Expose
private String RuleTag;
/**
* Get The protocol. Values:
`TCP`: TCP protocol.
`UDP`: UDP protocol.
* @return Proto The protocol. Values:
`TCP`: TCP protocol.
`UDP`: UDP protocol.
*/
public String getProto() {
return this.Proto;
}
/**
* Set The protocol. Values:
`TCP`: TCP protocol.
`UDP`: UDP protocol.
* @param Proto The protocol. Values:
`TCP`: TCP protocol.
`UDP`: UDP protocol.
*/
public void setProto(String Proto) {
this.Proto = Proto;
}
/**
* Get The access port, which can be:
A single port, such as 80
A port range, such as 81-82
Note that each rule can have up to 20 ports.
* @return Port The access port, which can be:
A single port, such as 80
A port range, such as 81-82
Note that each rule can have up to 20 ports.
*/
public String [] getPort() {
return this.Port;
}
/**
* Set The access port, which can be:
A single port, such as 80
A port range, such as 81-82
Note that each rule can have up to 20 ports.
* @param Port The access port, which can be:
A single port, such as 80
A port range, such as 81-82
Note that each rule can have up to 20 ports.
*/
public void setPort(String [] Port) {
this.Port = Port;
}
/**
* Get The origin type. Values:
`custom`: Specified origins
`origins`: Origin group
* @return OriginType The origin type. Values:
`custom`: Specified origins
`origins`: Origin group
*/
public String getOriginType() {
return this.OriginType;
}
/**
* Set The origin type. Values:
`custom`: Specified origins
`origins`: Origin group
* @param OriginType The origin type. Values:
`custom`: Specified origins
`origins`: Origin group
*/
public void setOriginType(String OriginType) {
this.OriginType = OriginType;
}
/**
* Get Origin server information:
When `OriginType=custom`, it indicates one or more origin servers, such as ["8.8.8.8","9.9.9.9"] or ["test.com"].
When `OriginType=origins`, it indicates an origin group ID, such as ["origin-537f5b41-162a-11ed-abaa-525400c5da15"].
* @return OriginValue Origin server information:
When `OriginType=custom`, it indicates one or more origin servers, such as ["8.8.8.8","9.9.9.9"] or ["test.com"].
When `OriginType=origins`, it indicates an origin group ID, such as ["origin-537f5b41-162a-11ed-abaa-525400c5da15"].
*/
public String [] getOriginValue() {
return this.OriginValue;
}
/**
* Set Origin server information:
When `OriginType=custom`, it indicates one or more origin servers, such as ["8.8.8.8","9.9.9.9"] or ["test.com"].
When `OriginType=origins`, it indicates an origin group ID, such as ["origin-537f5b41-162a-11ed-abaa-525400c5da15"].
* @param OriginValue Origin server information:
When `OriginType=custom`, it indicates one or more origin servers, such as ["8.8.8.8","9.9.9.9"] or ["test.com"].
When `OriginType=origins`, it indicates an origin group ID, such as ["origin-537f5b41-162a-11ed-abaa-525400c5da15"].
*/
public void setOriginValue(String [] OriginValue) {
this.OriginValue = OriginValue;
}
/**
* Get The rule ID.
* @return RuleId The rule ID.
*/
public String getRuleId() {
return this.RuleId;
}
/**
* Set The rule ID.
* @param RuleId The rule ID.
*/
public void setRuleId(String RuleId) {
this.RuleId = RuleId;
}
/**
* Get The rule status. Values:
`online`: Enabled.
`offline`: Disabled.
`progress`: Deploying
`stopping`: Disabling
`fail`: Failed to deploy or disable
* @return Status The rule status. Values:
`online`: Enabled.
`offline`: Disabled.
`progress`: Deploying
`stopping`: Disabling
`fail`: Failed to deploy or disable
*/
public String getStatus() {
return this.Status;
}
/**
* Set The rule status. Values:
`online`: Enabled.
`offline`: Disabled.
`progress`: Deploying
`stopping`: Disabling
`fail`: Failed to deploy or disable
* @param Status The rule status. Values:
`online`: Enabled.
`offline`: Disabled.
`progress`: Deploying
`stopping`: Disabling
`fail`: Failed to deploy or disable
*/
public void setStatus(String Status) {
this.Status = Status;
}
/**
* Get Passes the client IP. Values:
`TOA`: Pass the client IP via TOA (available only when `Proto=TCP`).
`PPV1`: Pass the client IP via Proxy Protocol V1 (available only when `Proto=TCP`).
`PPV2`: Pass the client IP via Proxy Protocol V2.
`OFF`: Not pass the client IP. Default value: OFF.
* @return ForwardClientIp Passes the client IP. Values:
`TOA`: Pass the client IP via TOA (available only when `Proto=TCP`).
`PPV1`: Pass the client IP via Proxy Protocol V1 (available only when `Proto=TCP`).
`PPV2`: Pass the client IP via Proxy Protocol V2.
`OFF`: Not pass the client IP. Default value: OFF.
*/
public String getForwardClientIp() {
return this.ForwardClientIp;
}
/**
* Set Passes the client IP. Values:
`TOA`: Pass the client IP via TOA (available only when `Proto=TCP`).
`PPV1`: Pass the client IP via Proxy Protocol V1 (available only when `Proto=TCP`).
`PPV2`: Pass the client IP via Proxy Protocol V2.
`OFF`: Not pass the client IP. Default value: OFF.
* @param ForwardClientIp Passes the client IP. Values:
`TOA`: Pass the client IP via TOA (available only when `Proto=TCP`).
`PPV1`: Pass the client IP via Proxy Protocol V1 (available only when `Proto=TCP`).
`PPV2`: Pass the client IP via Proxy Protocol V2.
`OFF`: Not pass the client IP. Default value: OFF.
*/
public void setForwardClientIp(String ForwardClientIp) {
this.ForwardClientIp = ForwardClientIp;
}
/**
* Get Whether to enable session persistence. Values:
`true`: Enable
`false`: Disable Default value: false
* @return SessionPersist Whether to enable session persistence. Values:
`true`: Enable
`false`: Disable Default value: false
*/
public Boolean getSessionPersist() {
return this.SessionPersist;
}
/**
* Set Whether to enable session persistence. Values:
`true`: Enable
`false`: Disable Default value: false
* @param SessionPersist Whether to enable session persistence. Values:
`true`: Enable
`false`: Disable Default value: false
*/
public void setSessionPersist(Boolean SessionPersist) {
this.SessionPersist = SessionPersist;
}
/**
* Get Duration for the persistent session. The value takes effect only when `SessionPersist = true`.
Note: u200dThis field may return null, indicating that no valid values can be obtained.
* @return SessionPersistTime Duration for the persistent session. The value takes effect only when `SessionPersist = true`.
Note: u200dThis field may return null, indicating that no valid values can be obtained.
*/
public Long getSessionPersistTime() {
return this.SessionPersistTime;
}
/**
* Set Duration for the persistent session. The value takes effect only when `SessionPersist = true`.
Note: u200dThis field may return null, indicating that no valid values can be obtained.
* @param SessionPersistTime Duration for the persistent session. The value takes effect only when `SessionPersist = true`.
Note: u200dThis field may return null, indicating that no valid values can be obtained.
*/
public void setSessionPersistTime(Long SessionPersistTime) {
this.SessionPersistTime = SessionPersistTime;
}
/**
* Get The origin port, which can be:
A single port, such as 80
A port range, such as 81-82
* @return OriginPort The origin port, which can be:
A single port, such as 80
A port range, such as 81-82
*/
public String getOriginPort() {
return this.OriginPort;
}
/**
* Set The origin port, which can be:
A single port, such as 80
A port range, such as 81-82
* @param OriginPort The origin port, which can be:
A single port, such as 80
A port range, such as 81-82
*/
public void setOriginPort(String OriginPort) {
this.OriginPort = OriginPort;
}
/**
* Get Rule tag.
Note: This field may return·`null`, indicating that no valid values can be obtained.
* @return RuleTag Rule tag.
Note: This field may return·`null`, indicating that no valid values can be obtained.
*/
public String getRuleTag() {
return this.RuleTag;
}
/**
* Set Rule tag.
Note: This field may return·`null`, indicating that no valid values can be obtained.
* @param RuleTag Rule tag.
Note: This field may return·`null`, indicating that no valid values can be obtained.
*/
public void setRuleTag(String RuleTag) {
this.RuleTag = RuleTag;
}
public ApplicationProxyRule() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public ApplicationProxyRule(ApplicationProxyRule source) {
if (source.Proto != null) {
this.Proto = new String(source.Proto);
}
if (source.Port != null) {
this.Port = new String[source.Port.length];
for (int i = 0; i < source.Port.length; i++) {
this.Port[i] = new String(source.Port[i]);
}
}
if (source.OriginType != null) {
this.OriginType = new String(source.OriginType);
}
if (source.OriginValue != null) {
this.OriginValue = new String[source.OriginValue.length];
for (int i = 0; i < source.OriginValue.length; i++) {
this.OriginValue[i] = new String(source.OriginValue[i]);
}
}
if (source.RuleId != null) {
this.RuleId = new String(source.RuleId);
}
if (source.Status != null) {
this.Status = new String(source.Status);
}
if (source.ForwardClientIp != null) {
this.ForwardClientIp = new String(source.ForwardClientIp);
}
if (source.SessionPersist != null) {
this.SessionPersist = new Boolean(source.SessionPersist);
}
if (source.SessionPersistTime != null) {
this.SessionPersistTime = new Long(source.SessionPersistTime);
}
if (source.OriginPort != null) {
this.OriginPort = new String(source.OriginPort);
}
if (source.RuleTag != null) {
this.RuleTag = new String(source.RuleTag);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "Proto", this.Proto);
this.setParamArraySimple(map, prefix + "Port.", this.Port);
this.setParamSimple(map, prefix + "OriginType", this.OriginType);
this.setParamArraySimple(map, prefix + "OriginValue.", this.OriginValue);
this.setParamSimple(map, prefix + "RuleId", this.RuleId);
this.setParamSimple(map, prefix + "Status", this.Status);
this.setParamSimple(map, prefix + "ForwardClientIp", this.ForwardClientIp);
this.setParamSimple(map, prefix + "SessionPersist", this.SessionPersist);
this.setParamSimple(map, prefix + "SessionPersistTime", this.SessionPersistTime);
this.setParamSimple(map, prefix + "OriginPort", this.OriginPort);
this.setParamSimple(map, prefix + "RuleTag", this.RuleTag);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy