
com.aliyun.sdk.service.waf_openapi20211001.models.DescribeDefenseRuleResponseBody Maven / Gradle / Ivy
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.waf_openapi20211001.models;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
*
* {@link DescribeDefenseRuleResponseBody} extends {@link TeaModel}
*
* DescribeDefenseRuleResponseBody
*/
public class DescribeDefenseRuleResponseBody extends TeaModel {
@com.aliyun.core.annotation.NameInMap("RequestId")
private String requestId;
@com.aliyun.core.annotation.NameInMap("Rule")
private Rule rule;
private DescribeDefenseRuleResponseBody(Builder builder) {
this.requestId = builder.requestId;
this.rule = builder.rule;
}
public static Builder builder() {
return new Builder();
}
public static DescribeDefenseRuleResponseBody create() {
return builder().build();
}
/**
* @return requestId
*/
public String getRequestId() {
return this.requestId;
}
/**
* @return rule
*/
public Rule getRule() {
return this.rule;
}
public static final class Builder {
private String requestId;
private Rule rule;
/**
* The ID of the request.
*
* example:
* D7861F61-5B61-46CE-A47C-6B19160D5EB0
*/
public Builder requestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* The configurations of the protection rule. The value is a JSON string that contains multiple parameters.
*/
public Builder rule(Rule rule) {
this.rule = rule;
return this;
}
public DescribeDefenseRuleResponseBody build() {
return new DescribeDefenseRuleResponseBody(this);
}
}
/**
*
* {@link DescribeDefenseRuleResponseBody} extends {@link TeaModel}
*
* DescribeDefenseRuleResponseBody
*/
public static class Rule extends TeaModel {
@com.aliyun.core.annotation.NameInMap("Config")
private String config;
@com.aliyun.core.annotation.NameInMap("DefenseOrigin")
private String defenseOrigin;
@com.aliyun.core.annotation.NameInMap("DefenseScene")
private String defenseScene;
@com.aliyun.core.annotation.NameInMap("GmtModified")
private Long gmtModified;
@com.aliyun.core.annotation.NameInMap("RuleId")
private Long ruleId;
@com.aliyun.core.annotation.NameInMap("RuleName")
private String ruleName;
@com.aliyun.core.annotation.NameInMap("Status")
private Integer status;
@com.aliyun.core.annotation.NameInMap("TemplateId")
private Long templateId;
private Rule(Builder builder) {
this.config = builder.config;
this.defenseOrigin = builder.defenseOrigin;
this.defenseScene = builder.defenseScene;
this.gmtModified = builder.gmtModified;
this.ruleId = builder.ruleId;
this.ruleName = builder.ruleName;
this.status = builder.status;
this.templateId = builder.templateId;
}
public static Builder builder() {
return new Builder();
}
public static Rule create() {
return builder().build();
}
/**
* @return config
*/
public String getConfig() {
return this.config;
}
/**
* @return defenseOrigin
*/
public String getDefenseOrigin() {
return this.defenseOrigin;
}
/**
* @return defenseScene
*/
public String getDefenseScene() {
return this.defenseScene;
}
/**
* @return gmtModified
*/
public Long getGmtModified() {
return this.gmtModified;
}
/**
* @return ruleId
*/
public Long getRuleId() {
return this.ruleId;
}
/**
* @return ruleName
*/
public String getRuleName() {
return this.ruleName;
}
/**
* @return status
*/
public Integer getStatus() {
return this.status;
}
/**
* @return templateId
*/
public Long getTemplateId() {
return this.templateId;
}
public static final class Builder {
private String config;
private String defenseOrigin;
private String defenseScene;
private Long gmtModified;
private Long ruleId;
private String ruleName;
private Integer status;
private Long templateId;
/**
* The details of the protection rule. The value is a JSON string that contains multiple parameters. For more information, see the "Protection rule parameters" section of the CreateDefenseRule topic.
*
* example:
* {"status":1,"policyId":1012,"action":"block"}
*/
public Builder config(String config) {
this.config = config;
return this;
}
/**
* The origin of the protection rule. Valid values:
*
* - custom: The protection rule is created by the user.
* - system: The protection rule is automatically generated by the system.
*
*
* example:
* custom
*/
public Builder defenseOrigin(String defenseOrigin) {
this.defenseOrigin = defenseOrigin;
return this;
}
/**
* The scenario in which the protection rule is used. For more information, see the description of DefenseScene in the CreateDefenseRule topic.
*
* example:
* waf_group
*/
public Builder defenseScene(String defenseScene) {
this.defenseScene = defenseScene;
return this;
}
/**
* The most recent time when the protection rule was modified.
*
* example:
* 1665196746000
*/
public Builder gmtModified(Long gmtModified) {
this.gmtModified = gmtModified;
return this;
}
/**
* The ID of the protection rule.
*
* example:
* 2732975
*/
public Builder ruleId(Long ruleId) {
this.ruleId = ruleId;
return this;
}
/**
* The name of the protection rule.
*
* example:
* test1
*/
public Builder ruleName(String ruleName) {
this.ruleName = ruleName;
return this;
}
/**
* The status of the protection rule. Valid values:
*
* - 0: disabled.
* - 1: enabled.
*
*
* example:
* 1
*/
public Builder status(Integer status) {
this.status = status;
return this;
}
/**
* The ID of the protection rule template.
*
* example:
* 9114
*/
public Builder templateId(Long templateId) {
this.templateId = templateId;
return this;
}
public Rule build() {
return new Rule(this);
}
}
}
}