Class ImageRegistryCredential

java.lang.Object
com.azure.resourcemanager.appplatform.models.ImageRegistryCredential
All Implemented Interfaces:
com.azure.json.JsonSerializable<ImageRegistryCredential>

public final class ImageRegistryCredential extends Object implements com.azure.json.JsonSerializable<ImageRegistryCredential>
Credential of the image registry.
  • Constructor Details

    • ImageRegistryCredential

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

    • username

      public String username()
      Get the username property: The username of the image registry credential.
      Returns:
      the username value.
    • withUsername

      public ImageRegistryCredential withUsername(String username)
      Set the username property: The username of the image registry credential.
      Parameters:
      username - the username value to set.
      Returns:
      the ImageRegistryCredential object itself.
    • password

      public String password()
      Get the password property: The password of the image registry credential.
      Returns:
      the password value.
    • withPassword

      public ImageRegistryCredential withPassword(String password)
      Set the password property: The password of the image registry credential.
      Parameters:
      password - the password value to set.
      Returns:
      the ImageRegistryCredential 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<ImageRegistryCredential>
      Throws:
      IOException
    • fromJson

      public static ImageRegistryCredential fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ImageRegistryCredential from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ImageRegistryCredential 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 ImageRegistryCredential.