Class HttpMessageDiagnostic
java.lang.Object
com.azure.resourcemanager.apimanagement.models.HttpMessageDiagnostic
- All Implemented Interfaces:
com.azure.json.JsonSerializable<HttpMessageDiagnostic>
public final class HttpMessageDiagnostic
extends Object
implements com.azure.json.JsonSerializable<HttpMessageDiagnostic>
Http message diagnostic settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody()Get the body property: Body logging settings.Get the dataMasking property: Data masking settings.static HttpMessageDiagnosticfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of HttpMessageDiagnostic from the JsonReader.headers()Get the headers property: Array of HTTP Headers to log.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the body property: Body logging settings.withDataMasking(DataMasking dataMasking) Set the dataMasking property: Data masking settings.withHeaders(List<String> headers) Set the headers property: Array of HTTP Headers to log.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
-
HttpMessageDiagnostic
public HttpMessageDiagnostic()Creates an instance of HttpMessageDiagnostic class.
-
-
Method Details
-
headers
Get the headers property: Array of HTTP Headers to log.- Returns:
- the headers value.
-
withHeaders
Set the headers property: Array of HTTP Headers to log.- Parameters:
headers- the headers value to set.- Returns:
- the HttpMessageDiagnostic object itself.
-
body
Get the body property: Body logging settings.- Returns:
- the body value.
-
withBody
Set the body property: Body logging settings.- Parameters:
body- the body value to set.- Returns:
- the HttpMessageDiagnostic object itself.
-
dataMasking
Get the dataMasking property: Data masking settings.- Returns:
- the dataMasking value.
-
withDataMasking
Set the dataMasking property: Data masking settings.- Parameters:
dataMasking- the dataMasking value to set.- Returns:
- the HttpMessageDiagnostic 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<HttpMessageDiagnostic>- Throws:
IOException
-
fromJson
public static HttpMessageDiagnostic fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of HttpMessageDiagnostic from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of HttpMessageDiagnostic if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the HttpMessageDiagnostic.
-