Share via


ParameterContract Class

  • java.lang.Object
    • com.azure.resourcemanager.apimanagement.models.ParameterContract

Implements

public final class ParameterContract
implements JsonSerializable<ParameterContract>

Operation parameters details.

Constructor Summary

Constructor Description
ParameterContract()

Creates an instance of ParameterContract class.

Method Summary

Modifier and Type Method and Description
String defaultValue()

Get the defaultValue property: Default parameter value.

String description()

Get the description property: Parameter description.

Map<String,ParameterExampleContract> examples()

Get the examples property: Exampled defined for the parameter.

static ParameterContract fromJson(JsonReader jsonReader)

Reads an instance of ParameterContract from the JsonReader.

String name()

Get the name property: Parameter name.

Boolean required()

Get the required property: Specifies whether parameter is required or not.

String schemaId()

Get the schemaId property: Schema identifier.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Parameter type.

String typeName()

Get the typeName property: Type name defined by the schema.

void validate()

Validates the instance.

List<String> values()

Get the values property: Parameter values.

ParameterContract withDefaultValue(String defaultValue)

Set the defaultValue property: Default parameter value.

ParameterContract withDescription(String description)

Set the description property: Parameter description.

ParameterContract withExamples(Map<String,ParameterExampleContract> examples)

Set the examples property: Exampled defined for the parameter.

ParameterContract withName(String name)

Set the name property: Parameter name.

ParameterContract withRequired(Boolean required)

Set the required property: Specifies whether parameter is required or not.

ParameterContract withSchemaId(String schemaId)

Set the schemaId property: Schema identifier.

ParameterContract withType(String type)

Set the type property: Parameter type.

ParameterContract withTypeName(String typeName)

Set the typeName property: Type name defined by the schema.

ParameterContract withValues(List<String> values)

Set the values property: Parameter values.

Methods inherited from java.lang.Object

Constructor Details

ParameterContract

public ParameterContract()

Creates an instance of ParameterContract class.

Method Details

defaultValue

public String defaultValue()

Get the defaultValue property: Default parameter value.

Returns:

the defaultValue value.

description

public String description()

Get the description property: Parameter description.

Returns:

the description value.

examples

public Map<String,ParameterExampleContract> examples()

Get the examples property: Exampled defined for the parameter.

Returns:

the examples value.

fromJson

public static ParameterContract fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

name

public String name()

Get the name property: Parameter name.

Returns:

the name value.

required

public Boolean required()

Get the required property: Specifies whether parameter is required or not.

Returns:

the required value.

schemaId

public String schemaId()

Get the schemaId property: Schema identifier.

Returns:

the schemaId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Parameter type.

Returns:

the type value.

typeName

public String typeName()

Get the typeName property: Type name defined by the schema.

Returns:

the typeName value.

validate

public void validate()

Validates the instance.

values

public List<String> values()

Get the values property: Parameter values.

Returns:

the values value.

withDefaultValue

public ParameterContract withDefaultValue(String defaultValue)

Set the defaultValue property: Default parameter value.

Parameters:

defaultValue - the defaultValue value to set.

Returns:

the ParameterContract object itself.

withDescription

public ParameterContract withDescription(String description)

Set the description property: Parameter description.

Parameters:

description - the description value to set.

Returns:

the ParameterContract object itself.

withExamples

public ParameterContract withExamples(Map<String,ParameterExampleContract> examples)

Set the examples property: Exampled defined for the parameter.

Parameters:

examples - the examples value to set.

Returns:

the ParameterContract object itself.

withName

public ParameterContract withName(String name)

Set the name property: Parameter name.

Parameters:

name - the name value to set.

Returns:

the ParameterContract object itself.

withRequired

public ParameterContract withRequired(Boolean required)

Set the required property: Specifies whether parameter is required or not.

Parameters:

required - the required value to set.

Returns:

the ParameterContract object itself.

withSchemaId

public ParameterContract withSchemaId(String schemaId)

Set the schemaId property: Schema identifier.

Parameters:

schemaId - the schemaId value to set.

Returns:

the ParameterContract object itself.

withType

public ParameterContract withType(String type)

Set the type property: Parameter type.

Parameters:

type - the type value to set.

Returns:

the ParameterContract object itself.

withTypeName

public ParameterContract withTypeName(String typeName)

Set the typeName property: Type name defined by the schema.

Parameters:

typeName - the typeName value to set.

Returns:

the ParameterContract object itself.

withValues

public ParameterContract withValues(List<String> values)

Set the values property: Parameter values.

Parameters:

values - the values value to set.

Returns:

the ParameterContract object itself.

Applies to