- 0.51.0 (latest)
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > UserInfo.BuilderImplements
UserInfoOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public UserInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
build()
public UserInfo build()
Returns | |
---|---|
Type | Description |
UserInfo |
buildPartial()
public UserInfo buildPartial()
Returns | |
---|---|
Type | Description |
UserInfo |
clear()
public UserInfo.Builder clear()
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
clearField(Descriptors.FieldDescriptor field)
public UserInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public UserInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
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 UserEvent.direct_user_request is set.
string user_agent = 2;
Returns | |
---|---|
Type | Description |
UserInfo.Builder | This builder for chaining. |
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;
Returns | |
---|---|
Type | Description |
UserInfo.Builder | This builder for chaining. |
clone()
public UserInfo.Builder clone()
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
getDefaultInstanceForType()
public UserInfo getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
UserInfo |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
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 UserEvent.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 UserEvent.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()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(UserInfo other)
public UserInfo.Builder mergeFrom(UserInfo other)
Parameter | |
---|---|
Name | Description |
other | UserInfo |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public UserInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public UserInfo.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final UserInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public UserInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public UserInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final UserInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
UserInfo.Builder |
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 UserEvent.direct_user_request is set.
string user_agent = 2;
Parameter | |
---|---|
Name | Description |
value | String The userAgent to set. |
Returns | |
---|---|
Type | Description |
UserInfo.Builder | This builder for chaining. |
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 UserEvent.direct_user_request is set.
string user_agent = 2;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for userAgent to set. |
Returns | |
---|---|
Type | Description |
UserInfo.Builder | This builder for chaining. |
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. |
Returns | |
---|---|
Type | Description |
UserInfo.Builder | This builder for chaining. |
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. |
Returns | |
---|---|
Type | Description |
UserInfo.Builder | This builder for chaining. |