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 Summary
ConstructorsConstructorDescriptionCreates an instance of TermsOfServiceProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the consentRequired property: Ask user for consent to the terms of service.enabled()Get the enabled property: Display terms of service during a sign-up process.static TermsOfServicePropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TermsOfServiceProperties from the JsonReader.text()Get the text property: A terms of service text.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withConsentRequired(Boolean consentRequired) Set the consentRequired property: Ask user for consent to the terms of service.withEnabled(Boolean enabled) Set the enabled property: Display terms of service during a sign-up process.Set the text property: A terms of service text.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
TermsOfServiceProperties
public TermsOfServiceProperties()Creates an instance of TermsOfServiceProperties class.
-
-
Method Details
-
text
Get the text property: A terms of service text.- Returns:
- the text value.
-
withText
Set the text property: A terms of service text.- Parameters:
text- the text value to set.- Returns:
- the TermsOfServiceProperties object itself.
-
enabled
Get the enabled property: Display terms of service during a sign-up process.- Returns:
- the enabled value.
-
withEnabled
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
Get the consentRequired property: Ask user for consent to the terms of service.- Returns:
- the consentRequired value.
-
withConsentRequired
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
- Specified by:
toJsonin interfacecom.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.
-