Class GeoLocationLogInfo


  • public class GeoLocationLogInfo
    extends java.lang.Object
    Geographic location details.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String city  
      protected java.lang.String country  
      protected java.lang.String ipAddress  
      protected java.lang.String region  
    • Constructor Summary

      Constructors 
      Constructor Description
      GeoLocationLogInfo​(java.lang.String ipAddress)
      Geographic location details.
      GeoLocationLogInfo​(java.lang.String ipAddress, java.lang.String city, java.lang.String region, java.lang.String country)
      Geographic location details.
    • Field Detail

      • city

        @Nullable
        protected final java.lang.String city
      • region

        @Nullable
        protected final java.lang.String region
      • country

        @Nullable
        protected final java.lang.String country
      • ipAddress

        @Nonnull
        protected final java.lang.String ipAddress
    • Constructor Detail

      • GeoLocationLogInfo

        public GeoLocationLogInfo​(@Nonnull
                                  java.lang.String ipAddress,
                                  @Nullable
                                  java.lang.String city,
                                  @Nullable
                                  java.lang.String region,
                                  @Nullable
                                  java.lang.String country)
        Geographic location details.

        Use newBuilder(java.lang.String) to create instances of this class without specifying values for all optional fields.

        Parameters:
        ipAddress - IP address. Must not be null.
        city - City name.
        region - Region name.
        country - Country code.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • GeoLocationLogInfo

        public GeoLocationLogInfo​(@Nonnull
                                  java.lang.String ipAddress)
        Geographic location details.

        The default values for unset fields will be used.

        Parameters:
        ipAddress - IP address. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getIpAddress

        @Nonnull
        public java.lang.String getIpAddress()
        IP address.
        Returns:
        value for this field, never null.
      • getCity

        @Nullable
        public java.lang.String getCity()
        City name.
        Returns:
        value for this field, or null if not present.
      • getRegion

        @Nullable
        public java.lang.String getRegion()
        Region name.
        Returns:
        value for this field, or null if not present.
      • getCountry

        @Nullable
        public java.lang.String getCountry()
        Country code.
        Returns:
        value for this field, or null if not present.
      • newBuilder

        public static GeoLocationLogInfo.Builder newBuilder​(java.lang.String ipAddress)
        Returns a new builder for creating an instance of this class.
        Parameters:
        ipAddress - IP address. Must not be null.
        Returns:
        builder for this class.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Returns:
        Formatted, multiline String representation of this object