Class ResponseContract
java.lang.Object
com.azure.resourcemanager.apimanagement.models.ResponseContract
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponseContract>
public final class ResponseContract
extends Object
implements com.azure.json.JsonSerializable<ResponseContract>
Operation response details.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the description property: Operation response description.static ResponseContractfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResponseContract from the JsonReader.headers()Get the headers property: Collection of operation response headers.Get the representations property: Collection of operation response representations.intGet the statusCode property: Operation response HTTP status code.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDescription(String description) Set the description property: Operation response description.withHeaders(List<ParameterContract> headers) Set the headers property: Collection of operation response headers.withRepresentations(List<RepresentationContract> representations) Set the representations property: Collection of operation response representations.withStatusCode(int statusCode) Set the statusCode property: Operation response HTTP status code.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
-
ResponseContract
public ResponseContract()Creates an instance of ResponseContract class.
-
-
Method Details
-
statusCode
public int statusCode()Get the statusCode property: Operation response HTTP status code.- Returns:
- the statusCode value.
-
withStatusCode
Set the statusCode property: Operation response HTTP status code.- Parameters:
statusCode- the statusCode value to set.- Returns:
- the ResponseContract object itself.
-
description
Get the description property: Operation response description.- Returns:
- the description value.
-
withDescription
Set the description property: Operation response description.- Parameters:
description- the description value to set.- Returns:
- the ResponseContract object itself.
-
representations
Get the representations property: Collection of operation response representations.- Returns:
- the representations value.
-
withRepresentations
Set the representations property: Collection of operation response representations.- Parameters:
representations- the representations value to set.- Returns:
- the ResponseContract object itself.
-
headers
Get the headers property: Collection of operation response headers.- Returns:
- the headers value.
-
withHeaders
Set the headers property: Collection of operation response headers.- Parameters:
headers- the headers value to set.- Returns:
- the ResponseContract 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<ResponseContract>- Throws:
IOException
-
fromJson
Reads an instance of ResponseContract from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ResponseContract 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 ResponseContract.
-