Class ParameterContract
java.lang.Object
com.azure.resourcemanager.apimanagement.models.ParameterContract
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ParameterContract>
public final class ParameterContract
extends Object
implements com.azure.json.JsonSerializable<ParameterContract>
Operation parameters details.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the defaultValue property: Default parameter value.Get the description property: Parameter description.examples()Get the examples property: Exampled defined for the parameter.static ParameterContractfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ParameterContract from the JsonReader.name()Get the name property: Parameter name.required()Get the required property: Specifies whether parameter is required or not.schemaId()Get the schemaId property: Schema identifier.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Parameter type.typeName()Get the typeName property: Type name defined by the schema.voidvalidate()Validates the instance.values()Get the values property: Parameter values.withDefaultValue(String defaultValue) Set the defaultValue property: Default parameter value.withDescription(String description) Set the description property: Parameter description.withExamples(Map<String, ParameterExampleContract> examples) Set the examples property: Exampled defined for the parameter.Set the name property: Parameter name.withRequired(Boolean required) Set the required property: Specifies whether parameter is required or not.withSchemaId(String schemaId) Set the schemaId property: Schema identifier.Set the type property: Parameter type.withTypeName(String typeName) Set the typeName property: Type name defined by the schema.withValues(List<String> values) Set the values property: Parameter values.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
-
ParameterContract
public ParameterContract()Creates an instance of ParameterContract class.
-
-
Method Details
-
name
Get the name property: Parameter name.- Returns:
- the name value.
-
withName
Set the name property: Parameter name.- Parameters:
name- the name value to set.- Returns:
- the ParameterContract object itself.
-
description
Get the description property: Parameter description.- Returns:
- the description value.
-
withDescription
Set the description property: Parameter description.- Parameters:
description- the description value to set.- Returns:
- the ParameterContract object itself.
-
type
Get the type property: Parameter type.- Returns:
- the type value.
-
withType
Set the type property: Parameter type.- Parameters:
type- the type value to set.- Returns:
- the ParameterContract object itself.
-
defaultValue
Get the defaultValue property: Default parameter value.- Returns:
- the defaultValue value.
-
withDefaultValue
Set the defaultValue property: Default parameter value.- Parameters:
defaultValue- the defaultValue value to set.- Returns:
- the ParameterContract object itself.
-
required
Get the required property: Specifies whether parameter is required or not.- Returns:
- the required value.
-
withRequired
Set the required property: Specifies whether parameter is required or not.- Parameters:
required- the required value to set.- Returns:
- the ParameterContract object itself.
-
values
Get the values property: Parameter values.- Returns:
- the values value.
-
withValues
Set the values property: Parameter values.- Parameters:
values- the values value to set.- Returns:
- the ParameterContract object itself.
-
schemaId
Get the schemaId property: Schema identifier.- Returns:
- the schemaId value.
-
withSchemaId
Set the schemaId property: Schema identifier.- Parameters:
schemaId- the schemaId value to set.- Returns:
- the ParameterContract object itself.
-
typeName
Get the typeName property: Type name defined by the schema.- Returns:
- the typeName value.
-
withTypeName
Set the typeName property: Type name defined by the schema.- Parameters:
typeName- the typeName value to set.- Returns:
- the ParameterContract object itself.
-
examples
Get the examples property: Exampled defined for the parameter.- Returns:
- the examples value.
-
withExamples
Set the examples property: Exampled defined for the parameter.- Parameters:
examples- the examples value to set.- Returns:
- the ParameterContract 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<ParameterContract>- Throws:
IOException
-
fromJson
Reads an instance of ParameterContract from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ParameterContract 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 ParameterContract.
-