Share via


RepresentationContract Class

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

Implements

public final class RepresentationContract
implements JsonSerializable<RepresentationContract>

Operation request/response representation details.

Constructor Summary

Constructor Description
RepresentationContract()

Creates an instance of RepresentationContract class.

Method Summary

Modifier and Type Method and Description
String contentType()

Get the contentType property: Specifies a registered or custom content type for this representation, e.g.

Map<String,ParameterExampleContract> examples()

Get the examples property: Exampled defined for the representation.

List<ParameterContract> formParameters()

Get the formParameters property: Collection of form parameters.

static RepresentationContract fromJson(JsonReader jsonReader)

Reads an instance of RepresentationContract from the JsonReader.

String schemaId()

Get the schemaId property: Schema identifier.

JsonWriter toJson(JsonWriter jsonWriter)
String typeName()

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

void validate()

Validates the instance.

RepresentationContract withContentType(String contentType)

Set the contentType property: Specifies a registered or custom content type for this representation, e.g.

RepresentationContract withExamples(Map<String,ParameterExampleContract> examples)

Set the examples property: Exampled defined for the representation.

RepresentationContract withFormParameters(List<ParameterContract> formParameters)

Set the formParameters property: Collection of form parameters.

RepresentationContract withSchemaId(String schemaId)

Set the schemaId property: Schema identifier.

RepresentationContract withTypeName(String typeName)

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

Methods inherited from java.lang.Object

Constructor Details

RepresentationContract

public RepresentationContract()

Creates an instance of RepresentationContract class.

Method Details

contentType

public String contentType()

Get the contentType property: Specifies a registered or custom content type for this representation, e.g. application/xml.

Returns:

the contentType value.

examples

public Map<String,ParameterExampleContract> examples()

Get the examples property: Exampled defined for the representation.

Returns:

the examples value.

formParameters

public List<ParameterContract> formParameters()

Get the formParameters property: Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..

Returns:

the formParameters value.

fromJson

public static RepresentationContract fromJson(JsonReader jsonReader)

Reads an instance of RepresentationContract from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RepresentationContract 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.

schemaId

public String schemaId()

Get the schemaId property: Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.

Returns:

the schemaId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

typeName

public String typeName()

Get the typeName property: Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.

Returns:

the typeName value.

validate

public void validate()

Validates the instance.

withContentType

public RepresentationContract withContentType(String contentType)

Set the contentType property: Specifies a registered or custom content type for this representation, e.g. application/xml.

Parameters:

contentType - the contentType value to set.

Returns:

the RepresentationContract object itself.

withExamples

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

Set the examples property: Exampled defined for the representation.

Parameters:

examples - the examples value to set.

Returns:

the RepresentationContract object itself.

withFormParameters

public RepresentationContract withFormParameters(List<ParameterContract> formParameters)

Set the formParameters property: Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..

Parameters:

formParameters - the formParameters value to set.

Returns:

the RepresentationContract object itself.

withSchemaId

public RepresentationContract withSchemaId(String schemaId)

Set the schemaId property: Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.

Parameters:

schemaId - the schemaId value to set.

Returns:

the RepresentationContract object itself.

withTypeName

public RepresentationContract withTypeName(String typeName)

Set the typeName property: Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.

Parameters:

typeName - the typeName value to set.

Returns:

the RepresentationContract object itself.

Applies to