
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.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ApplicationProxyRule extends AbstractModel{
/**
* 协议,取值有:
TCP:TCP协议;
UDP:UDP协议。
*/
@SerializedName("Proto")
@Expose
private String Proto;
/**
* 端口,支持格式:
单个端口,如:80。
端口段,如:81-82。表示81,82两个端口。
注意:一条规则最多可填写20个端口。
*/
@SerializedName("Port")
@Expose
private String [] Port;
/**
* 源站类型,取值有:
custom:手动添加;
origins:源站组。
*/
@SerializedName("OriginType")
@Expose
private String OriginType;
/**
* 源站信息:
当OriginType=custom时,表示一个或多个源站,如:
OriginValue=["8.8.8.8:80","9.9.9.9:80"]
OriginValue=["test.com:80"];
当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
*/
@SerializedName("OriginValue")
@Expose
private String [] OriginValue;
/**
* 规则ID。
*/
@SerializedName("RuleId")
@Expose
private String RuleId;
/**
* 状态,取值有:
online:启用;
offline:停用;
progress:部署中;
stopping:停用中;
fail:部署失败/停用失败。
*/
@SerializedName("Status")
@Expose
private String Status;
/**
* 传递客户端IP,取值有:
TOA:TOA(仅Proto=TCP时可选);
PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
PPV2:Proxy Protocol传递,协议版本V2;
OFF:不传递。 默认值:OFF。
*/
@SerializedName("ForwardClientIp")
@Expose
private String ForwardClientIp;
/**
* 是否开启会话保持,取值有:
true:开启;
false:关闭。 默认值:false。
*/
@SerializedName("SessionPersist")
@Expose
private Boolean SessionPersist;
/**
* Get 协议,取值有:
TCP:TCP协议;
UDP:UDP协议。
* @return Proto 协议,取值有:
TCP:TCP协议;
UDP:UDP协议。
*/
public String getProto() {
return this.Proto;
}
/**
* Set 协议,取值有:
TCP:TCP协议;
UDP:UDP协议。
* @param Proto 协议,取值有:
TCP:TCP协议;
UDP:UDP协议。
*/
public void setProto(String Proto) {
this.Proto = Proto;
}
/**
* Get 端口,支持格式:
单个端口,如:80。
端口段,如:81-82。表示81,82两个端口。
注意:一条规则最多可填写20个端口。
* @return Port 端口,支持格式:
单个端口,如:80。
端口段,如:81-82。表示81,82两个端口。
注意:一条规则最多可填写20个端口。
*/
public String [] getPort() {
return this.Port;
}
/**
* Set 端口,支持格式:
单个端口,如:80。
端口段,如:81-82。表示81,82两个端口。
注意:一条规则最多可填写20个端口。
* @param Port 端口,支持格式:
单个端口,如:80。
端口段,如:81-82。表示81,82两个端口。
注意:一条规则最多可填写20个端口。
*/
public void setPort(String [] Port) {
this.Port = Port;
}
/**
* Get 源站类型,取值有:
custom:手动添加;
origins:源站组。
* @return OriginType 源站类型,取值有:
custom:手动添加;
origins:源站组。
*/
public String getOriginType() {
return this.OriginType;
}
/**
* Set 源站类型,取值有:
custom:手动添加;
origins:源站组。
* @param OriginType 源站类型,取值有:
custom:手动添加;
origins:源站组。
*/
public void setOriginType(String OriginType) {
this.OriginType = OriginType;
}
/**
* Get 源站信息:
当OriginType=custom时,表示一个或多个源站,如:
OriginValue=["8.8.8.8:80","9.9.9.9:80"]
OriginValue=["test.com:80"];
当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
* @return OriginValue 源站信息:
当OriginType=custom时,表示一个或多个源站,如:
OriginValue=["8.8.8.8:80","9.9.9.9:80"]
OriginValue=["test.com:80"];
当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
*/
public String [] getOriginValue() {
return this.OriginValue;
}
/**
* Set 源站信息:
当OriginType=custom时,表示一个或多个源站,如:
OriginValue=["8.8.8.8:80","9.9.9.9:80"]
OriginValue=["test.com:80"];
当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
* @param OriginValue 源站信息:
当OriginType=custom时,表示一个或多个源站,如:
OriginValue=["8.8.8.8:80","9.9.9.9:80"]
OriginValue=["test.com:80"];
当OriginType=origins时,要求有且仅有一个元素,表示源站组ID,如:
OriginValue=["origin-537f5b41-162a-11ed-abaa-525400c5da15"]。
*/
public void setOriginValue(String [] OriginValue) {
this.OriginValue = OriginValue;
}
/**
* Get 规则ID。
* @return RuleId 规则ID。
*/
public String getRuleId() {
return this.RuleId;
}
/**
* Set 规则ID。
* @param RuleId 规则ID。
*/
public void setRuleId(String RuleId) {
this.RuleId = RuleId;
}
/**
* Get 状态,取值有:
online:启用;
offline:停用;
progress:部署中;
stopping:停用中;
fail:部署失败/停用失败。
* @return Status 状态,取值有:
online:启用;
offline:停用;
progress:部署中;
stopping:停用中;
fail:部署失败/停用失败。
*/
public String getStatus() {
return this.Status;
}
/**
* Set 状态,取值有:
online:启用;
offline:停用;
progress:部署中;
stopping:停用中;
fail:部署失败/停用失败。
* @param Status 状态,取值有:
online:启用;
offline:停用;
progress:部署中;
stopping:停用中;
fail:部署失败/停用失败。
*/
public void setStatus(String Status) {
this.Status = Status;
}
/**
* Get 传递客户端IP,取值有:
TOA:TOA(仅Proto=TCP时可选);
PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
PPV2:Proxy Protocol传递,协议版本V2;
OFF:不传递。 默认值:OFF。
* @return ForwardClientIp 传递客户端IP,取值有:
TOA:TOA(仅Proto=TCP时可选);
PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
PPV2:Proxy Protocol传递,协议版本V2;
OFF:不传递。 默认值:OFF。
*/
public String getForwardClientIp() {
return this.ForwardClientIp;
}
/**
* Set 传递客户端IP,取值有:
TOA:TOA(仅Proto=TCP时可选);
PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
PPV2:Proxy Protocol传递,协议版本V2;
OFF:不传递。 默认值:OFF。
* @param ForwardClientIp 传递客户端IP,取值有:
TOA:TOA(仅Proto=TCP时可选);
PPV1:Proxy Protocol传递,协议版本V1(仅Proto=TCP时可选);
PPV2:Proxy Protocol传递,协议版本V2;
OFF:不传递。 默认值:OFF。
*/
public void setForwardClientIp(String ForwardClientIp) {
this.ForwardClientIp = ForwardClientIp;
}
/**
* Get 是否开启会话保持,取值有:
true:开启;
false:关闭。 默认值:false。
* @return SessionPersist 是否开启会话保持,取值有:
true:开启;
false:关闭。 默认值:false。
*/
public Boolean getSessionPersist() {
return this.SessionPersist;
}
/**
* Set 是否开启会话保持,取值有:
true:开启;
false:关闭。 默认值:false。
* @param SessionPersist 是否开启会话保持,取值有:
true:开启;
false:关闭。 默认值:false。
*/
public void setSessionPersist(Boolean SessionPersist) {
this.SessionPersist = SessionPersist;
}
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);
}
}
/**
* 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);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy