Class RepresentationContract
java.lang.Object
com.azure.resourcemanager.apimanagement.models.RepresentationContract
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RepresentationContract>
public final class RepresentationContract
extends Object
implements com.azure.json.JsonSerializable<RepresentationContract>
Operation request/response representation details.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RepresentationContract class. -
Method Summary
Modifier and TypeMethodDescriptionGet the contentType property: Specifies a registered or custom content type for this representation, e.g.examples()Get the examples property: Exampled defined for the representation.Get the formParameters property: Collection of form parameters.static RepresentationContractfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RepresentationContract from the JsonReader.schemaId()Get the schemaId property: Schema identifier.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) typeName()Get the typeName property: Type name defined by the schema.voidvalidate()Validates the instance.withContentType(String contentType) Set the contentType property: Specifies a registered or custom content type for this representation, e.g.withExamples(Map<String, ParameterExampleContract> examples) Set the examples property: Exampled defined for the representation.withFormParameters(List<ParameterContract> formParameters) Set the formParameters property: Collection of form parameters.withSchemaId(String schemaId) Set the schemaId property: Schema identifier.withTypeName(String typeName) Set the typeName property: Type name defined by the schema.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
-
RepresentationContract
public RepresentationContract()Creates an instance of RepresentationContract class.
-
-
Method Details
-
contentType
Get the contentType property: Specifies a registered or custom content type for this representation, e.g. application/xml.- Returns:
- the contentType value.
-
withContentType
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.
-
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.
-
withSchemaId
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.
-
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.
-
withTypeName
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.
-
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.
-
withFormParameters
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.
-
examples
Get the examples property: Exampled defined for the representation.- Returns:
- the examples value.
-
withExamples
Set the examples property: Exampled defined for the representation.- Parameters:
examples- the examples value to set.- Returns:
- the RepresentationContract 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<RepresentationContract>- Throws:
IOException
-
fromJson
public static RepresentationContract fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the RepresentationContract.
-