
cn.ucloud.unet.models.CreateFirewallRequest Maven / Gradle / Ivy
/**
* Copyright 2021 UCloud Technology Co., Ltd.
*
* 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 cn.ucloud.unet.models;
import cn.ucloud.common.annotation.NotEmpty;
import cn.ucloud.common.annotation.UCloudParam;
import cn.ucloud.common.request.Request;
import java.util.List;
public class CreateFirewallRequest extends Request {
/** 地域 */
@NotEmpty
@UCloudParam("Region")
private String region;
/** 项目ID。不填写为默认项目,子帐号必须填写 */
@UCloudParam("ProjectId")
private String projectId;
/**
* 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注,备注最大长度64
*/
@NotEmpty
@UCloudParam("Rule")
private List rule;
/** 防火墙名称 */
@NotEmpty
@UCloudParam("Name")
private String name;
/** 防火墙业务组,默认为Default */
@UCloudParam("Tag")
private String tag;
/** 防火墙描述,默认为空 */
@UCloudParam("Remark")
private String remark;
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public List getRule() {
return rule;
}
public void setRule(List rule) {
this.rule = rule;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}