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 Details

    • ContentSource

      public ContentSource()
      Creates an instance of ContentSource class.
  • Method Details

    • hash

      public ContentHash hash()
      Get the hash property: Gets or sets the hash.
      Returns:
      the hash value.
    • withHash

      public ContentSource withHash(ContentHash hash)
      Set the hash property: Gets or sets the hash.
      Parameters:
      hash - the hash value to set.
      Returns:
      the ContentSource object itself.
    • type

      public ContentSourceType type()
      Get the type property: Gets or sets the content source type.
      Returns:
      the type value.
    • withType

      public ContentSource withType(ContentSourceType type)
      Set the type property: Gets or sets the content source type.
      Parameters:
      type - the type value to set.
      Returns:
      the ContentSource object itself.
    • value

      public String 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

      public ContentSource withValue(String value)
      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

      public String version()
      Get the version property: Gets or sets the version of the content.
      Returns:
      the version value.
    • withVersion

      public ContentSource withVersion(String version)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ContentSource>
      Throws:
      IOException
    • fromJson

      public static ContentSource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.