Class AgentRegistrationKeys

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

public final class AgentRegistrationKeys extends Object implements com.azure.json.JsonSerializable<AgentRegistrationKeys>
Definition of the agent registration keys.
  • Constructor Details

    • AgentRegistrationKeys

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

    • primary

      public String primary()
      Get the primary property: Gets or sets the primary key.
      Returns:
      the primary value.
    • withPrimary

      public AgentRegistrationKeys withPrimary(String primary)
      Set the primary property: Gets or sets the primary key.
      Parameters:
      primary - the primary value to set.
      Returns:
      the AgentRegistrationKeys object itself.
    • secondary

      public String secondary()
      Get the secondary property: Gets or sets the secondary key.
      Returns:
      the secondary value.
    • withSecondary

      public AgentRegistrationKeys withSecondary(String secondary)
      Set the secondary property: Gets or sets the secondary key.
      Parameters:
      secondary - the secondary value to set.
      Returns:
      the AgentRegistrationKeys 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<AgentRegistrationKeys>
      Throws:
      IOException
    • fromJson

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