Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information. Code generated by Microsoft (R) AutoRest Code Generator.
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */
package com.microsoft.azure.management.network; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty;
Defines contents of a web application rule.
/** * Defines contents of a web application rule. */
public class WebApplicationFirewallCustomRule {
The name of the resource that is unique within a policy. This name can be used to access the resource.
/** * The name of the resource that is unique within a policy. This name can * be used to access the resource. */
@JsonProperty(value = "name") private String name;
A unique read-only string that changes whenever the resource is updated.
/** * A unique read-only string that changes whenever the resource is updated. */
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag;
Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
/** * Priority of the rule. Rules with a lower value will be evaluated before * rules with a higher value. */
@JsonProperty(value = "priority", required = true) private int priority;
The rule type. Possible values include: 'MatchRule', 'Invalid'.
/** * The rule type. Possible values include: 'MatchRule', 'Invalid'. */
@JsonProperty(value = "ruleType", required = true) private WebApplicationFirewallRuleType ruleType;
List of match conditions.
/** * List of match conditions. */
@JsonProperty(value = "matchConditions", required = true) private List<MatchCondition> matchConditions;
Type of Actions. Possible values include: 'Allow', 'Block', 'Log'.
/** * Type of Actions. Possible values include: 'Allow', 'Block', 'Log'. */
@JsonProperty(value = "action", required = true) private WebApplicationFirewallAction action;
Get the name of the resource that is unique within a policy. This name can be used to access the resource.
Returns:the name value
/** * Get the name of the resource that is unique within a policy. This name can be used to access the resource. * * @return the name value */
public String name() { return this.name; }
Set the name of the resource that is unique within a policy. This name can be used to access the resource.
Params:
  • name – the name value to set
Returns:the WebApplicationFirewallCustomRule object itself.
/** * Set the name of the resource that is unique within a policy. This name can be used to access the resource. * * @param name the name value to set * @return the WebApplicationFirewallCustomRule object itself. */
public WebApplicationFirewallCustomRule withName(String name) { this.name = name; return this; }
Get a unique read-only string that changes whenever the resource is updated.
Returns:the etag value
/** * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */
public String etag() { return this.etag; }
Get priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
Returns:the priority value
/** * Get priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. * * @return the priority value */
public int priority() { return this.priority; }
Set priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
Params:
  • priority – the priority value to set
Returns:the WebApplicationFirewallCustomRule object itself.
/** * Set priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. * * @param priority the priority value to set * @return the WebApplicationFirewallCustomRule object itself. */
public WebApplicationFirewallCustomRule withPriority(int priority) { this.priority = priority; return this; }
Get the rule type. Possible values include: 'MatchRule', 'Invalid'.
Returns:the ruleType value
/** * Get the rule type. Possible values include: 'MatchRule', 'Invalid'. * * @return the ruleType value */
public WebApplicationFirewallRuleType ruleType() { return this.ruleType; }
Set the rule type. Possible values include: 'MatchRule', 'Invalid'.
Params:
  • ruleType – the ruleType value to set
Returns:the WebApplicationFirewallCustomRule object itself.
/** * Set the rule type. Possible values include: 'MatchRule', 'Invalid'. * * @param ruleType the ruleType value to set * @return the WebApplicationFirewallCustomRule object itself. */
public WebApplicationFirewallCustomRule withRuleType(WebApplicationFirewallRuleType ruleType) { this.ruleType = ruleType; return this; }
Get list of match conditions.
Returns:the matchConditions value
/** * Get list of match conditions. * * @return the matchConditions value */
public List<MatchCondition> matchConditions() { return this.matchConditions; }
Set list of match conditions.
Params:
  • matchConditions – the matchConditions value to set
Returns:the WebApplicationFirewallCustomRule object itself.
/** * Set list of match conditions. * * @param matchConditions the matchConditions value to set * @return the WebApplicationFirewallCustomRule object itself. */
public WebApplicationFirewallCustomRule withMatchConditions(List<MatchCondition> matchConditions) { this.matchConditions = matchConditions; return this; }
Get type of Actions. Possible values include: 'Allow', 'Block', 'Log'.
Returns:the action value
/** * Get type of Actions. Possible values include: 'Allow', 'Block', 'Log'. * * @return the action value */
public WebApplicationFirewallAction action() { return this.action; }
Set type of Actions. Possible values include: 'Allow', 'Block', 'Log'.
Params:
  • action – the action value to set
Returns:the WebApplicationFirewallCustomRule object itself.
/** * Set type of Actions. Possible values include: 'Allow', 'Block', 'Log'. * * @param action the action value to set * @return the WebApplicationFirewallCustomRule object itself. */
public WebApplicationFirewallCustomRule withAction(WebApplicationFirewallAction action) { this.action = action; return this; } }