public final class PolicySettings extends Object
| Constructor and Description |
|---|
PolicySettings() |
| Modifier and Type | Method and Description |
|---|---|
String |
defaultCustomBlockResponseBody()
Get the defaultCustomBlockResponseBody property: If the action type is block, customer can override the response
body.
|
PolicySettingsDefaultCustomBlockResponseStatusCode |
defaultCustomBlockResponseStatusCode()
Get the defaultCustomBlockResponseStatusCode property: If the action type is block, this field defines the
default customer overridable http response status code.
|
String |
defaultRedirectUrl()
Get the defaultRedirectUrl property: If action type is redirect, this field represents the default redirect URL
for the client.
|
PolicyEnabledState |
enabledState()
Get the enabledState property: describes if the policy is in enabled state or disabled state.
|
PolicyMode |
mode()
Get the mode property: Describes if it is in detection mode or prevention mode at policy level.
|
void |
validate()
Validates the instance.
|
PolicySettings |
withDefaultCustomBlockResponseBody(String defaultCustomBlockResponseBody)
Set the defaultCustomBlockResponseBody property: If the action type is block, customer can override the response
body.
|
PolicySettings |
withDefaultCustomBlockResponseStatusCode(PolicySettingsDefaultCustomBlockResponseStatusCode defaultCustomBlockResponseStatusCode)
Set the defaultCustomBlockResponseStatusCode property: If the action type is block, this field defines the
default customer overridable http response status code.
|
PolicySettings |
withDefaultRedirectUrl(String defaultRedirectUrl)
Set the defaultRedirectUrl property: If action type is redirect, this field represents the default redirect URL
for the client.
|
PolicySettings |
withEnabledState(PolicyEnabledState enabledState)
Set the enabledState property: describes if the policy is in enabled state or disabled state.
|
PolicySettings |
withMode(PolicyMode mode)
Set the mode property: Describes if it is in detection mode or prevention mode at policy level.
|
public PolicyEnabledState enabledState()
public PolicySettings withEnabledState(PolicyEnabledState enabledState)
enabledState - the enabledState value to set.public PolicyMode mode()
public PolicySettings withMode(PolicyMode mode)
mode - the mode value to set.public String defaultRedirectUrl()
public PolicySettings withDefaultRedirectUrl(String defaultRedirectUrl)
defaultRedirectUrl - the defaultRedirectUrl value to set.public PolicySettingsDefaultCustomBlockResponseStatusCode defaultCustomBlockResponseStatusCode()
public PolicySettings withDefaultCustomBlockResponseStatusCode(PolicySettingsDefaultCustomBlockResponseStatusCode defaultCustomBlockResponseStatusCode)
defaultCustomBlockResponseStatusCode - the defaultCustomBlockResponseStatusCode value to set.public String defaultCustomBlockResponseBody()
public PolicySettings withDefaultCustomBlockResponseBody(String defaultCustomBlockResponseBody)
defaultCustomBlockResponseBody - the defaultCustomBlockResponseBody value to set.public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2020 Microsoft Corporation. All rights reserved.