Class ContentSource
java.lang.Object
com.azure.resourcemanager.automation.models.ContentSource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ContentSource>
public final class ContentSource
extends Object
implements com.azure.json.JsonSerializable<ContentSource>
Definition of the content source.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ContentSource
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ContentSource from the JsonReader.hash()
Get the hash property: Gets or sets the hash.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: Gets or sets the content source type.void
validate()
Validates the instance.value()
Get the value property: Gets or sets the value of the content.version()
Get the version property: Gets or sets the version of the content.withHash
(ContentHash hash) Set the hash property: Gets or sets the hash.withType
(ContentSourceType type) Set the type property: Gets or sets the content source type.Set the value property: Gets or sets the value of the content.withVersion
(String version) Set the version property: Gets or sets the version of the content.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ContentSource
public ContentSource()Creates an instance of ContentSource class.
-
-
Method Details
-
hash
Get the hash property: Gets or sets the hash.- Returns:
- the hash value.
-
withHash
Set the hash property: Gets or sets the hash.- Parameters:
hash
- the hash value to set.- Returns:
- the ContentSource object itself.
-
type
Get the type property: Gets or sets the content source type.- Returns:
- the type value.
-
withType
Set the type property: Gets or sets the content source type.- Parameters:
type
- the type value to set.- Returns:
- the ContentSource object itself.
-
value
Get the value property: Gets or sets the value of the content. This is based on the content source type.- Returns:
- the value value.
-
withValue
Set the value property: Gets or sets the value of the content. This is based on the content source type.- Parameters:
value
- the value value to set.- Returns:
- the ContentSource object itself.
-
version
Get the version property: Gets or sets the version of the content.- Returns:
- the version value.
-
withVersion
Set the version property: Gets or sets the version of the content.- Parameters:
version
- the version value to set.- Returns:
- the ContentSource object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ContentSource>
- Throws:
IOException
-
fromJson
Reads an instance of ContentSource from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ContentSource 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 ContentSource.
-