Class User


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               date="2023-02-28T02:08:46.393880Z[Etc/UTC]")
    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​(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​(java.lang.String key)
      • secondary

        public User secondary​(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​(java.lang.String secondary)
      • ip

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public User anonymous​(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​(java.lang.Boolean anonymous)
      • custom

        public User custom​(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​(java.util.Map<java.lang.String,​java.lang.Object> custom)
      • privateAttrs

        public User privateAttrs​(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​(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.
      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
        Return the additional (undeclared) property.
      • getAdditionalProperty

        public java.lang.Object getAdditionalProperty​(java.lang.String key)
        Return the additional (undeclared) property with the specified name.
      • 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
      • validateJsonObject

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws java.io.IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        java.io.IOException - if the JSON Object 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