java.lang.Object
com.azure.resourcemanager.containerregistry.models.Request
All Implemented Interfaces:
com.azure.json.JsonSerializable<Request>

public final class Request extends Object implements com.azure.json.JsonSerializable<Request>
The request that generated the event.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Request class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the addr property: The IP or hostname and possibly port of the client connection that initiated the event.
    static Request
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Request from the JsonReader.
    Get the host property: The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.
    id()
    Get the id property: The ID of the request that initiated the event.
    Get the method property: The request method that generated the event.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the useragent property: The user agent header of the request.
    void
    Validates the instance.
    Set the addr property: The IP or hostname and possibly port of the client connection that initiated the event.
    Set the host property: The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.
    Set the id property: The ID of the request that initiated the event.
    Set the method property: The request method that generated the event.
    withUseragent(String useragent)
    Set the useragent property: The user agent header of the request.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • Request

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

    • id

      public String id()
      Get the id property: The ID of the request that initiated the event.
      Returns:
      the id value.
    • withId

      public Request withId(String id)
      Set the id property: The ID of the request that initiated the event.
      Parameters:
      id - the id value to set.
      Returns:
      the Request object itself.
    • addr

      public String addr()
      Get the addr property: The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request.
      Returns:
      the addr value.
    • withAddr

      public Request withAddr(String addr)
      Set the addr property: The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request.
      Parameters:
      addr - the addr value to set.
      Returns:
      the Request object itself.
    • host

      public String host()
      Get the host property: The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.
      Returns:
      the host value.
    • withHost

      public Request withHost(String host)
      Set the host property: The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.
      Parameters:
      host - the host value to set.
      Returns:
      the Request object itself.
    • method

      public String method()
      Get the method property: The request method that generated the event.
      Returns:
      the method value.
    • withMethod

      public Request withMethod(String method)
      Set the method property: The request method that generated the event.
      Parameters:
      method - the method value to set.
      Returns:
      the Request object itself.
    • useragent

      public String useragent()
      Get the useragent property: The user agent header of the request.
      Returns:
      the useragent value.
    • withUseragent

      public Request withUseragent(String useragent)
      Set the useragent property: The user agent header of the request.
      Parameters:
      useragent - the useragent value to set.
      Returns:
      the Request 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<Request>
      Throws:
      IOException
    • fromJson

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