Class DiagnosticContractInner

java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.apimanagement.fluent.models.DiagnosticContractInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>

public final class DiagnosticContractInner extends com.azure.core.management.ProxyResource
Diagnostic details.
  • Constructor Details

    • DiagnosticContractInner

      public DiagnosticContractInner()
      Creates an instance of DiagnosticContractInner class.
  • Method Details

    • type

      public String type()
      Get the type property: The type of the resource.
      Overrides:
      type in class com.azure.core.management.ProxyResource
      Returns:
      the type value.
    • name

      public String name()
      Get the name property: The name of the resource.
      Overrides:
      name in class com.azure.core.management.ProxyResource
      Returns:
      the name value.
    • id

      public String id()
      Get the id property: Fully qualified resource Id for the resource.
      Overrides:
      id in class com.azure.core.management.ProxyResource
      Returns:
      the id value.
    • alwaysLog

      public AlwaysLog alwaysLog()
      Get the alwaysLog property: Specifies for what type of messages sampling settings should not apply.
      Returns:
      the alwaysLog value.
    • withAlwaysLog

      public DiagnosticContractInner withAlwaysLog(AlwaysLog alwaysLog)
      Set the alwaysLog property: Specifies for what type of messages sampling settings should not apply.
      Parameters:
      alwaysLog - the alwaysLog value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • loggerId

      public String loggerId()
      Get the loggerId property: Resource Id of a target logger.
      Returns:
      the loggerId value.
    • withLoggerId

      public DiagnosticContractInner withLoggerId(String loggerId)
      Set the loggerId property: Resource Id of a target logger.
      Parameters:
      loggerId - the loggerId value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • sampling

      public SamplingSettings sampling()
      Get the sampling property: Sampling settings for Diagnostic.
      Returns:
      the sampling value.
    • withSampling

      public DiagnosticContractInner withSampling(SamplingSettings sampling)
      Set the sampling property: Sampling settings for Diagnostic.
      Parameters:
      sampling - the sampling value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • frontend

      public PipelineDiagnosticSettings frontend()
      Get the frontend property: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
      Returns:
      the frontend value.
    • withFrontend

      public DiagnosticContractInner withFrontend(PipelineDiagnosticSettings frontend)
      Set the frontend property: Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
      Parameters:
      frontend - the frontend value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • backend

      public PipelineDiagnosticSettings backend()
      Get the backend property: Diagnostic settings for incoming/outgoing HTTP messages to the Backend.
      Returns:
      the backend value.
    • withBackend

      Set the backend property: Diagnostic settings for incoming/outgoing HTTP messages to the Backend.
      Parameters:
      backend - the backend value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • logClientIp

      public Boolean logClientIp()
      Get the logClientIp property: Log the ClientIP. Default is false.
      Returns:
      the logClientIp value.
    • withLogClientIp

      public DiagnosticContractInner withLogClientIp(Boolean logClientIp)
      Set the logClientIp property: Log the ClientIP. Default is false.
      Parameters:
      logClientIp - the logClientIp value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • httpCorrelationProtocol

      public HttpCorrelationProtocol httpCorrelationProtocol()
      Get the httpCorrelationProtocol property: Sets correlation protocol to use for Application Insights diagnostics.
      Returns:
      the httpCorrelationProtocol value.
    • withHttpCorrelationProtocol

      public DiagnosticContractInner withHttpCorrelationProtocol(HttpCorrelationProtocol httpCorrelationProtocol)
      Set the httpCorrelationProtocol property: Sets correlation protocol to use for Application Insights diagnostics.
      Parameters:
      httpCorrelationProtocol - the httpCorrelationProtocol value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • verbosity

      public Verbosity verbosity()
      Get the verbosity property: The verbosity level applied to traces emitted by trace policies.
      Returns:
      the verbosity value.
    • withVerbosity

      public DiagnosticContractInner withVerbosity(Verbosity verbosity)
      Set the verbosity property: The verbosity level applied to traces emitted by trace policies.
      Parameters:
      verbosity - the verbosity value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • operationNameFormat

      public OperationNameFormat operationNameFormat()
      Get the operationNameFormat property: The format of the Operation Name for Application Insights telemetries. Default is Name.
      Returns:
      the operationNameFormat value.
    • withOperationNameFormat

      public DiagnosticContractInner withOperationNameFormat(OperationNameFormat operationNameFormat)
      Set the operationNameFormat property: The format of the Operation Name for Application Insights telemetries. Default is Name.
      Parameters:
      operationNameFormat - the operationNameFormat value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • metrics

      public Boolean metrics()
      Get the metrics property: Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
      Returns:
      the metrics value.
    • withMetrics

      public DiagnosticContractInner withMetrics(Boolean metrics)
      Set the metrics property: Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
      Parameters:
      metrics - the metrics value to set.
      Returns:
      the DiagnosticContractInner object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
      Overrides:
      toJson in class com.azure.core.management.ProxyResource
      Throws:
      IOException
    • fromJson

      public static DiagnosticContractInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DiagnosticContractInner from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DiagnosticContractInner 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 DiagnosticContractInner.