Class CompressionSettings
java.lang.Object
com.azure.resourcemanager.cdn.models.CompressionSettings
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CompressionSettings>
public final class CompressionSettings
extends Object
implements com.azure.json.JsonSerializable<CompressionSettings>
settings for compression.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the contentTypesToCompress property: List of content types on which compression applies.static CompressionSettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CompressionSettings from the JsonReader.Get the isCompressionEnabled property: Indicates whether content compression is enabled on AzureFrontDoor.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withContentTypesToCompress(List<String> contentTypesToCompress) Set the contentTypesToCompress property: List of content types on which compression applies.withIsCompressionEnabled(Boolean isCompressionEnabled) Set the isCompressionEnabled property: Indicates whether content compression is enabled on AzureFrontDoor.Methods inherited from class 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
-
CompressionSettings
public CompressionSettings()Creates an instance of CompressionSettings class.
-
-
Method Details
-
contentTypesToCompress
-
withContentTypesToCompress
Set the contentTypesToCompress property: List of content types on which compression applies. The value should be a valid MIME type.- Parameters:
contentTypesToCompress- the contentTypesToCompress value to set.- Returns:
- the CompressionSettings object itself.
-
isCompressionEnabled
Get the isCompressionEnabled property: Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.- Returns:
- the isCompressionEnabled value.
-
withIsCompressionEnabled
Set the isCompressionEnabled property: Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.- Parameters:
isCompressionEnabled- the isCompressionEnabled value to set.- Returns:
- the CompressionSettings 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<CompressionSettings>- Throws:
IOException
-
fromJson
Reads an instance of CompressionSettings from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CompressionSettings 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 CompressionSettings.
-