Class TermsOfServiceProperties

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

public final class TermsOfServiceProperties extends Object implements com.azure.json.JsonSerializable<TermsOfServiceProperties>
Terms of service contract properties.
  • Constructor Details

    • TermsOfServiceProperties

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

    • text

      public String text()
      Get the text property: A terms of service text.
      Returns:
      the text value.
    • withText

      public TermsOfServiceProperties withText(String text)
      Set the text property: A terms of service text.
      Parameters:
      text - the text value to set.
      Returns:
      the TermsOfServiceProperties object itself.
    • enabled

      public Boolean enabled()
      Get the enabled property: Display terms of service during a sign-up process.
      Returns:
      the enabled value.
    • withEnabled

      public TermsOfServiceProperties withEnabled(Boolean enabled)
      Set the enabled property: Display terms of service during a sign-up process.
      Parameters:
      enabled - the enabled value to set.
      Returns:
      the TermsOfServiceProperties object itself.
    • consentRequired

      public Boolean consentRequired()
      Get the consentRequired property: Ask user for consent to the terms of service.
      Returns:
      the consentRequired value.
    • withConsentRequired

      public TermsOfServiceProperties withConsentRequired(Boolean consentRequired)
      Set the consentRequired property: Ask user for consent to the terms of service.
      Parameters:
      consentRequired - the consentRequired value to set.
      Returns:
      the TermsOfServiceProperties 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<TermsOfServiceProperties>
      Throws:
      IOException
    • fromJson

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