Class PortalConfigCspProperties
java.lang.Object
com.azure.resourcemanager.apimanagement.models.PortalConfigCspProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PortalConfigCspProperties>
public final class PortalConfigCspProperties
extends Object
implements com.azure.json.JsonSerializable<PortalConfigCspProperties>
The developer portal Content Security Policy (CSP) settings.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PortalConfigCspProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the allowedSources property: Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`.static PortalConfigCspPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PortalConfigCspProperties from the JsonReader.mode()Get the mode property: The mode of the developer portal Content Security Policy (CSP).Get the reportUri property: The URLs used by the browser to report CSP violations.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAllowedSources(List<String> allowedSources) Set the allowedSources property: Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`.Set the mode property: The mode of the developer portal Content Security Policy (CSP).withReportUri(List<String> reportUri) Set the reportUri property: The URLs used by the browser to report CSP violations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PortalConfigCspProperties
public PortalConfigCspProperties()Creates an instance of PortalConfigCspProperties class.
-
-
Method Details
-
mode
Get the mode property: The mode of the developer portal Content Security Policy (CSP).- Returns:
- the mode value.
-
withMode
Set the mode property: The mode of the developer portal Content Security Policy (CSP).- Parameters:
mode- the mode value to set.- Returns:
- the PortalConfigCspProperties object itself.
-
reportUri
Get the reportUri property: The URLs used by the browser to report CSP violations.- Returns:
- the reportUri value.
-
withReportUri
Set the reportUri property: The URLs used by the browser to report CSP violations.- Parameters:
reportUri- the reportUri value to set.- Returns:
- the PortalConfigCspProperties object itself.
-
allowedSources
Get the allowedSources property: Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`.- Returns:
- the allowedSources value.
-
withAllowedSources
Set the allowedSources property: Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`.- Parameters:
allowedSources- the allowedSources value to set.- Returns:
- the PortalConfigCspProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PortalConfigCspProperties>- Throws:
IOException
-
fromJson
public static PortalConfigCspProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PortalConfigCspProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PortalConfigCspProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the PortalConfigCspProperties.
-