public static final class UserInfo.Builder extends GeneratedMessageV3.Builder<UserInfo.Builder> implements UserInfoOrBuilder
Information of an end user.
Protobuf type google.cloud.discoveryengine.v1beta.UserInfo
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public UserInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public UserInfo buildPartial()
clear()
public UserInfo.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public UserInfo.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public UserInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearUserAgent()
public UserInfo.Builder clearUserAgent()
User agent as included in the HTTP header. Required for getting
[SearchResponse.sponsored_results][].
The field must be a UTF-8 encoded string with a length limit of 1,000
characters. Otherwise, an INVALID_ARGUMENT error is returned.
This should not be set when using the client side event reporting with
GTM or JavaScript tag in
UserEventService.CollectUserEvent
or if [direct_user_request][] is set.
string user_agent = 2;
clearUserId()
public UserInfo.Builder clearUserId()
Highly recommended for logged-in users. Unique identifier for logged-in
user, such as a user name. Don't set for anonymous users.
Always use a hashed value for this ID.
Don't set the field to the same fixed ID for different users. This mixes
the event history of those users together, which results in degraded
model quality.
The field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
string user_id = 1;
clone()
public UserInfo.Builder clone()
Overrides
getDefaultInstanceForType()
public UserInfo getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getUserAgent()
public String getUserAgent()
User agent as included in the HTTP header. Required for getting
[SearchResponse.sponsored_results][].
The field must be a UTF-8 encoded string with a length limit of 1,000
characters. Otherwise, an INVALID_ARGUMENT error is returned.
This should not be set when using the client side event reporting with
GTM or JavaScript tag in
UserEventService.CollectUserEvent
or if [direct_user_request][] is set.
string user_agent = 2;
Returns |
---|
Type | Description |
String | The userAgent.
|
getUserAgentBytes()
public ByteString getUserAgentBytes()
User agent as included in the HTTP header. Required for getting
[SearchResponse.sponsored_results][].
The field must be a UTF-8 encoded string with a length limit of 1,000
characters. Otherwise, an INVALID_ARGUMENT error is returned.
This should not be set when using the client side event reporting with
GTM or JavaScript tag in
UserEventService.CollectUserEvent
or if [direct_user_request][] is set.
string user_agent = 2;
Returns |
---|
Type | Description |
ByteString | The bytes for userAgent.
|
getUserId()
public String getUserId()
Highly recommended for logged-in users. Unique identifier for logged-in
user, such as a user name. Don't set for anonymous users.
Always use a hashed value for this ID.
Don't set the field to the same fixed ID for different users. This mixes
the event history of those users together, which results in degraded
model quality.
The field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
string user_id = 1;
Returns |
---|
Type | Description |
String | The userId.
|
getUserIdBytes()
public ByteString getUserIdBytes()
Highly recommended for logged-in users. Unique identifier for logged-in
user, such as a user name. Don't set for anonymous users.
Always use a hashed value for this ID.
Don't set the field to the same fixed ID for different users. This mixes
the event history of those users together, which results in degraded
model quality.
The field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
string user_id = 1;
Returns |
---|
Type | Description |
ByteString | The bytes for userId.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(UserInfo other)
public UserInfo.Builder mergeFrom(UserInfo other)
public UserInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public UserInfo.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final UserInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public UserInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public UserInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final UserInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides
setUserAgent(String value)
public UserInfo.Builder setUserAgent(String value)
User agent as included in the HTTP header. Required for getting
[SearchResponse.sponsored_results][].
The field must be a UTF-8 encoded string with a length limit of 1,000
characters. Otherwise, an INVALID_ARGUMENT error is returned.
This should not be set when using the client side event reporting with
GTM or JavaScript tag in
UserEventService.CollectUserEvent
or if [direct_user_request][] is set.
string user_agent = 2;
Parameter |
---|
Name | Description |
value | String
The userAgent to set.
|
setUserAgentBytes(ByteString value)
public UserInfo.Builder setUserAgentBytes(ByteString value)
User agent as included in the HTTP header. Required for getting
[SearchResponse.sponsored_results][].
The field must be a UTF-8 encoded string with a length limit of 1,000
characters. Otherwise, an INVALID_ARGUMENT error is returned.
This should not be set when using the client side event reporting with
GTM or JavaScript tag in
UserEventService.CollectUserEvent
or if [direct_user_request][] is set.
string user_agent = 2;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for userAgent to set.
|
setUserId(String value)
public UserInfo.Builder setUserId(String value)
Highly recommended for logged-in users. Unique identifier for logged-in
user, such as a user name. Don't set for anonymous users.
Always use a hashed value for this ID.
Don't set the field to the same fixed ID for different users. This mixes
the event history of those users together, which results in degraded
model quality.
The field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
string user_id = 1;
Parameter |
---|
Name | Description |
value | String
The userId to set.
|
setUserIdBytes(ByteString value)
public UserInfo.Builder setUserIdBytes(ByteString value)
Highly recommended for logged-in users. Unique identifier for logged-in
user, such as a user name. Don't set for anonymous users.
Always use a hashed value for this ID.
Don't set the field to the same fixed ID for different users. This mixes
the event history of those users together, which results in degraded
model quality.
The field must be a UTF-8 encoded string with a length limit of 128
characters. Otherwise, an INVALID_ARGUMENT error is returned.
string user_id = 1;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for userId to set.
|