Class CacheExpirationActionParameters
java.lang.Object
com.azure.resourcemanager.cdn.models.CacheExpirationActionParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CacheExpirationActionParameters>
public final class CacheExpirationActionParameters
extends Object
implements com.azure.json.JsonSerializable<CacheExpirationActionParameters>
Defines the parameters for the cache expiration action.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CacheExpirationActionParameters class. -
Method Summary
Modifier and TypeMethodDescriptionGet the cacheBehavior property: Caching behavior for the requests.Get the cacheDuration property: The duration for which the content needs to be cached.Get the cacheType property: The level at which the content needs to be cached.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CacheExpirationActionParameters from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) typeName()Get the typeName property: The typeName property.voidvalidate()Validates the instance.withCacheBehavior(CacheBehavior cacheBehavior) Set the cacheBehavior property: Caching behavior for the requests.withCacheDuration(String cacheDuration) Set the cacheDuration property: The duration for which the content needs to be cached.withCacheType(CacheType cacheType) Set the cacheType property: The level at which the content needs to be cached.withTypeName(String typeName) Set the typeName property: The typeName property.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
-
CacheExpirationActionParameters
public CacheExpirationActionParameters()Creates an instance of CacheExpirationActionParameters class.
-
-
Method Details
-
typeName
Get the typeName property: The typeName property.- Returns:
- the typeName value.
-
withTypeName
Set the typeName property: The typeName property.- Parameters:
typeName- the typeName value to set.- Returns:
- the CacheExpirationActionParameters object itself.
-
cacheBehavior
Get the cacheBehavior property: Caching behavior for the requests.- Returns:
- the cacheBehavior value.
-
withCacheBehavior
Set the cacheBehavior property: Caching behavior for the requests.- Parameters:
cacheBehavior- the cacheBehavior value to set.- Returns:
- the CacheExpirationActionParameters object itself.
-
cacheType
Get the cacheType property: The level at which the content needs to be cached.- Returns:
- the cacheType value.
-
withCacheType
Set the cacheType property: The level at which the content needs to be cached.- Parameters:
cacheType- the cacheType value to set.- Returns:
- the CacheExpirationActionParameters object itself.
-
cacheDuration
Get the cacheDuration property: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.- Returns:
- the cacheDuration value.
-
withCacheDuration
Set the cacheDuration property: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.- Parameters:
cacheDuration- the cacheDuration value to set.- Returns:
- the CacheExpirationActionParameters 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<CacheExpirationActionParameters>- Throws:
IOException
-
fromJson
public static CacheExpirationActionParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CacheExpirationActionParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CacheExpirationActionParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the CacheExpirationActionParameters.
-