Package com.launchdarkly.api.model
Class User
- java.lang.Object
-
- com.launchdarkly.api.model.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
User.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static java.util.HashSet<java.lang.String>
openapiFields
static java.util.HashSet<java.lang.String>
openapiRequiredFields
static java.lang.String
SERIALIZED_NAME_ANONYMOUS
static java.lang.String
SERIALIZED_NAME_AVATAR
static java.lang.String
SERIALIZED_NAME_COUNTRY
static java.lang.String
SERIALIZED_NAME_CUSTOM
static java.lang.String
SERIALIZED_NAME_EMAIL
static java.lang.String
SERIALIZED_NAME_FIRST_NAME
static java.lang.String
SERIALIZED_NAME_IP
static java.lang.String
SERIALIZED_NAME_KEY
static java.lang.String
SERIALIZED_NAME_LAST_NAME
static java.lang.String
SERIALIZED_NAME_NAME
static java.lang.String
SERIALIZED_NAME_PRIVATE_ATTRS
static java.lang.String
SERIALIZED_NAME_SECONDARY
-
Constructor Summary
Constructors Constructor Description User()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description User
addPrivateAttrsItem(java.lang.String privateAttrsItem)
User
anonymous(java.lang.Boolean anonymous)
User
avatar(java.lang.String avatar)
User
country(java.lang.String country)
User
custom(java.util.Map<java.lang.String,java.lang.Object> custom)
User
email(java.lang.String email)
boolean
equals(java.lang.Object o)
User
firstName(java.lang.String firstName)
static User
fromJson(java.lang.String jsonString)
Create an instance of User given an JSON stringjava.util.Map<java.lang.String,java.lang.Object>
getAdditionalProperties()
Return the additional (undeclared) property.java.lang.Object
getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.java.lang.Boolean
getAnonymous()
Whether the user is anonymous.java.lang.String
getAvatar()
An absolute URL to an avatar image.java.lang.String
getCountry()
The user's countryjava.util.Map<java.lang.String,java.lang.Object>
getCustom()
Any other custom attributes for this user.java.lang.String
getEmail()
The user's emailjava.lang.String
getFirstName()
The user's first namejava.lang.String
getIp()
The user's IP addressjava.lang.String
getKey()
The user key.java.lang.String
getLastName()
The user's last namejava.lang.String
getName()
The user's full namejava.util.List<java.lang.String>
getPrivateAttrs()
A list of attribute names that are marked as private.java.lang.String
getSecondary()
If provided, used with the user key to generate a variation in percentage rolloutsint
hashCode()
User
ip(java.lang.String ip)
User
key(java.lang.String key)
User
lastName(java.lang.String lastName)
User
name(java.lang.String name)
User
privateAttrs(java.util.List<java.lang.String> privateAttrs)
User
putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value.User
putCustomItem(java.lang.String key, java.lang.Object customItem)
User
secondary(java.lang.String secondary)
void
setAnonymous(java.lang.Boolean anonymous)
void
setAvatar(java.lang.String avatar)
void
setCountry(java.lang.String country)
void
setCustom(java.util.Map<java.lang.String,java.lang.Object> custom)
void
setEmail(java.lang.String email)
void
setFirstName(java.lang.String firstName)
void
setIp(java.lang.String ip)
void
setKey(java.lang.String key)
void
setLastName(java.lang.String lastName)
void
setName(java.lang.String name)
void
setPrivateAttrs(java.util.List<java.lang.String> privateAttrs)
void
setSecondary(java.lang.String secondary)
java.lang.String
toJson()
Convert an instance of User to an JSON stringjava.lang.String
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues found
-
-
-
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
-
-
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:
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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
-
-