Class CredentialCreateOrUpdateProperties

java.lang.Object
com.azure.resourcemanager.automation.fluent.models.CredentialCreateOrUpdateProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<CredentialCreateOrUpdateProperties>

public final class CredentialCreateOrUpdateProperties extends Object implements com.azure.json.JsonSerializable<CredentialCreateOrUpdateProperties>
The properties of the create credential operation.
  • Constructor Details

    • CredentialCreateOrUpdateProperties

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

    • username

      public String username()
      Get the username property: Gets or sets the user name of the credential.
      Returns:
      the username value.
    • withUsername

      public CredentialCreateOrUpdateProperties withUsername(String username)
      Set the username property: Gets or sets the user name of the credential.
      Parameters:
      username - the username value to set.
      Returns:
      the CredentialCreateOrUpdateProperties object itself.
    • password

      public String password()
      Get the password property: Gets or sets the password of the credential.
      Returns:
      the password value.
    • withPassword

      public CredentialCreateOrUpdateProperties withPassword(String password)
      Set the password property: Gets or sets the password of the credential.
      Parameters:
      password - the password value to set.
      Returns:
      the CredentialCreateOrUpdateProperties object itself.
    • description

      public String description()
      Get the description property: Gets or sets the description of the credential.
      Returns:
      the description value.
    • withDescription

      public CredentialCreateOrUpdateProperties withDescription(String description)
      Set the description property: Gets or sets the description of the credential.
      Parameters:
      description - the description value to set.
      Returns:
      the CredentialCreateOrUpdateProperties 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<CredentialCreateOrUpdateProperties>
      Throws:
      IOException
    • fromJson

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