Class User


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               date="2026-03-05T10:45:26.516033Z[Etc/UTC]",
               comments="Generator version: 7.18.0")
    public class User
    extends java.lang.Object
    User
    • Field Detail

      • SERIALIZED_NAME_KEY

        public static final java.lang.String SERIALIZED_NAME_KEY
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_SECONDARY

        public static final java.lang.String SERIALIZED_NAME_SECONDARY
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_IP

        public static final java.lang.String SERIALIZED_NAME_IP
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_COUNTRY

        public static final java.lang.String SERIALIZED_NAME_COUNTRY
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_EMAIL

        public static final java.lang.String SERIALIZED_NAME_EMAIL
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_FIRST_NAME

        public static final java.lang.String SERIALIZED_NAME_FIRST_NAME
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_LAST_NAME

        public static final java.lang.String SERIALIZED_NAME_LAST_NAME
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_AVATAR

        public static final java.lang.String SERIALIZED_NAME_AVATAR
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_NAME

        public static final java.lang.String SERIALIZED_NAME_NAME
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_ANONYMOUS

        public static final java.lang.String SERIALIZED_NAME_ANONYMOUS
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_CUSTOM

        public static final java.lang.String SERIALIZED_NAME_CUSTOM
        See Also:
        Constant Field Values
      • SERIALIZED_NAME_PRIVATE_ATTRS

        public static final java.lang.String SERIALIZED_NAME_PRIVATE_ATTRS
        See Also:
        Constant Field Values
      • openapiFields

        public static java.util.HashSet<java.lang.String> openapiFields
      • openapiRequiredFields

        public static java.util.HashSet<java.lang.String> openapiRequiredFields
    • Constructor Detail

      • User

        public User()
    • Method Detail

      • key

        public User key​(@Nullable
                        java.lang.String key)
      • getKey

        @Nullable
        public java.lang.String getKey()
        The user key. This is the only mandatory user attribute.
        Returns:
        key
      • setKey

        public void setKey​(@Nullable
                           java.lang.String key)
      • secondary

        public User secondary​(@Nullable
                              java.lang.String secondary)
      • getSecondary

        @Nullable
        public java.lang.String getSecondary()
        If provided, used with the user key to generate a variation in percentage rollouts
        Returns:
        secondary
      • setSecondary

        public void setSecondary​(@Nullable
                                 java.lang.String secondary)
      • ip

        public User ip​(@Nullable
                       java.lang.String ip)
      • getIp

        @Nullable
        public java.lang.String getIp()
        The user's IP address
        Returns:
        ip
      • setIp

        public void setIp​(@Nullable
                          java.lang.String ip)
      • country

        public User country​(@Nullable
                            java.lang.String country)
      • getCountry

        @Nullable
        public java.lang.String getCountry()
        The user's country
        Returns:
        country
      • setCountry

        public void setCountry​(@Nullable
                               java.lang.String country)
      • email

        public User email​(@Nullable
                          java.lang.String email)
      • getEmail

        @Nullable
        public java.lang.String getEmail()
        The user's email
        Returns:
        email
      • setEmail

        public void setEmail​(@Nullable
                             java.lang.String email)
      • firstName

        public User firstName​(@Nullable
                              java.lang.String firstName)
      • getFirstName

        @Nullable
        public java.lang.String getFirstName()
        The user's first name
        Returns:
        firstName
      • setFirstName

        public void setFirstName​(@Nullable
                                 java.lang.String firstName)
      • lastName

        public User lastName​(@Nullable
                             java.lang.String lastName)
      • getLastName

        @Nullable
        public java.lang.String getLastName()
        The user's last name
        Returns:
        lastName
      • setLastName

        public void setLastName​(@Nullable
                                java.lang.String lastName)
      • avatar

        public User avatar​(@Nullable
                           java.lang.String avatar)
      • getAvatar

        @Nullable
        public java.lang.String getAvatar()
        An absolute URL to an avatar image.
        Returns:
        avatar
      • setAvatar

        public void setAvatar​(@Nullable
                              java.lang.String avatar)
      • name

        public User name​(@Nullable
                         java.lang.String name)
      • getName

        @Nullable
        public java.lang.String getName()
        The user's full name
        Returns:
        name
      • setName

        public void setName​(@Nullable
                            java.lang.String name)
      • anonymous

        public User anonymous​(@Nullable
                              java.lang.Boolean anonymous)
      • getAnonymous

        @Nullable
        public java.lang.Boolean getAnonymous()
        Whether the user is anonymous. If true, this user does not appear on the Contexts list in the LaunchDarkly user interface.
        Returns:
        anonymous
      • setAnonymous

        public void setAnonymous​(@Nullable
                                 java.lang.Boolean anonymous)
      • custom

        public User custom​(@Nullable
                           java.util.Map<java.lang.String,​java.lang.Object> custom)
      • putCustomItem

        public User putCustomItem​(java.lang.String key,
                                  java.lang.Object customItem)
      • getCustom

        @Nullable
        public java.util.Map<java.lang.String,​java.lang.Object> getCustom()
        Any other custom attributes for this user. Custom attributes contain any other user data that you would like to use to conditionally target your users.
        Returns:
        custom
      • setCustom

        public void setCustom​(@Nullable
                              java.util.Map<java.lang.String,​java.lang.Object> custom)
      • privateAttrs

        public User privateAttrs​(@Nullable
                                 java.util.List<java.lang.String> privateAttrs)
      • addPrivateAttrsItem

        public User addPrivateAttrsItem​(java.lang.String privateAttrsItem)
      • getPrivateAttrs

        @Nullable
        public java.util.List<java.lang.String> getPrivateAttrs()
        A list of attribute names that are marked as private. You can use these attributes in targeting rules and segments. If you are using a server-side SDK, the SDK will not send the private attribute back to LaunchDarkly. If you are using a client-side SDK, the SDK will send the private attribute back to LaunchDarkly for evaluation. However, the SDK won't send the attribute to LaunchDarkly in events data, LaunchDarkly won't store the private attribute, and the private attribute will not appear on the Contexts list.
        Returns:
        privateAttrs
      • setPrivateAttrs

        public void setPrivateAttrs​(@Nullable
                                    java.util.List<java.lang.String> privateAttrs)
      • putAdditionalProperty

        public User putAdditionalProperty​(java.lang.String key,
                                          java.lang.Object value)
        Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
        Parameters:
        key - name of the property
        value - value of the property
        Returns:
        the User instance itself
      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
        Return the additional (undeclared) property.
        Returns:
        a map of objects
      • getAdditionalProperty

        public java.lang.Object getAdditionalProperty​(java.lang.String key)
        Return the additional (undeclared) property with the specified name.
        Parameters:
        key - name of the property
        Returns:
        an object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws java.io.IOException
        Validates the JSON Element and throws an exception if issues found
        Parameters:
        jsonElement - JSON Element
        Throws:
        java.io.IOException - if the JSON Element is invalid with respect to User
      • fromJson

        public static User fromJson​(java.lang.String jsonString)
                             throws java.io.IOException
        Create an instance of User given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of User
        Throws:
        java.io.IOException - if the JSON string is invalid with respect to User
      • toJson

        public java.lang.String toJson()
        Convert an instance of User to an JSON string
        Returns:
        JSON string