public
static
final
class
User
.
Builder
extends
GeneratedMessageV3
.
Builder<User
.
Builder
>
implements
UserOrBuilder
A user in Google Chat.
When returned as an output from a request, if your Chat app authenticates as
a user
, the output
for a User
resource only populates the user's name
and type
.
Protobuf type google.chat.v1.User
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > User.BuilderImplements
UserOrBuilderStatic Methods
getDescriptor()
public
static
final
Descriptors
.
Descriptor
getDescriptor
()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public
User
.
Builder
addRepeatedField
(
Descriptors
.
FieldDescriptor
field
,
Object
value
)
build()
public
User
build
()
buildPartial()
public
User
buildPartial
()
clear()
public
User
.
Builder
clear
()
clearDisplayName()
public
User
.
Builder
clearDisplayName
()
Output only. The user's display name.
string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearDomainId()
public
User
.
Builder
clearDomainId
()
Unique identifier of the user's Google Workspace domain.
string domain_id = 6;
clearField(Descriptors.FieldDescriptor field)
public
User
.
Builder
clearField
(
Descriptors
.
FieldDescriptor
field
)
clearIsAnonymous()
public
User
.
Builder
clearIsAnonymous
()
Output only. When true
, the user is deleted or their profile is not
visible.
bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearName()
public
User
.
Builder
clearName
()
Resource name for a Google Chat user .
Format: users/{user}
. users/app
can be used as an alias for the calling
app bot
user.
For human users
, {user}
is the same
user identifier as:
-
the
id
for the Person in the People API. For example,users/123456789
in Chat API represents the same person as the123456789
Person profile ID in People API. -
the
id
for a user in the Admin SDK Directory API. -
the user's email address can be used as an alias for
{user}
in API requests. For example, if the People API Person profile ID foruser@example.com
is123456789
, you can useusers/user@example.com
as an alias to referenceusers/123456789
. Only the canonical resource name (for exampleusers/123456789
) will be returned from the API.
string name = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
public
User
.
Builder
clearOneof
(
Descriptors
.
OneofDescriptor
oneof
)
clearType()
public
User
.
Builder
clearType
()
User type.
.google.chat.v1.User.Type type = 5;
clone()
public
User
.
Builder
clone
()
getDefaultInstanceForType()
public
User
getDefaultInstanceForType
()
getDescriptorForType()
public
Descriptors
.
Descriptor
getDescriptorForType
()
getDisplayName()
public
String
getDisplayName
()
Output only. The user's display name.
string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDisplayNameBytes()
public
ByteString
getDisplayNameBytes
()
Output only. The user's display name.
string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDomainId()
public
String
getDomainId
()
Unique identifier of the user's Google Workspace domain.
string domain_id = 6;
getDomainIdBytes()
public
ByteString
getDomainIdBytes
()
Unique identifier of the user's Google Workspace domain.
string domain_id = 6;
getIsAnonymous()
public
boolean
getIsAnonymous
()
Output only. When true
, the user is deleted or their profile is not
visible.
bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getName()
public
String
getName
()
Resource name for a Google Chat user .
Format: users/{user}
. users/app
can be used as an alias for the calling
app bot
user.
For human users
, {user}
is the same
user identifier as:
-
the
id
for the Person in the People API. For example,users/123456789
in Chat API represents the same person as the123456789
Person profile ID in People API. -
the
id
for a user in the Admin SDK Directory API. -
the user's email address can be used as an alias for
{user}
in API requests. For example, if the People API Person profile ID foruser@example.com
is123456789
, you can useusers/user@example.com
as an alias to referenceusers/123456789
. Only the canonical resource name (for exampleusers/123456789
) will be returned from the API.
string name = 1;
getNameBytes()
public
ByteString
getNameBytes
()
Resource name for a Google Chat user .
Format: users/{user}
. users/app
can be used as an alias for the calling
app bot
user.
For human users
, {user}
is the same
user identifier as:
-
the
id
for the Person in the People API. For example,users/123456789
in Chat API represents the same person as the123456789
Person profile ID in People API. -
the
id
for a user in the Admin SDK Directory API. -
the user's email address can be used as an alias for
{user}
in API requests. For example, if the People API Person profile ID foruser@example.com
is123456789
, you can useusers/user@example.com
as an alias to referenceusers/123456789
. Only the canonical resource name (for exampleusers/123456789
) will be returned from the API.
string name = 1;
getType()
public
User
.
Type
getType
()
User type.
.google.chat.v1.User.Type type = 5;
getTypeValue()
public
int
getTypeValue
()
User type.
.google.chat.v1.User.Type type = 5;
internalGetFieldAccessorTable()
protected
GeneratedMessageV3
.
FieldAccessorTable
internalGetFieldAccessorTable
()
isInitialized()
public
final
boolean
isInitialized
()
mergeFrom(User other)
public
User
.
Builder
mergeFrom
(
User
other
)
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public
User
.
Builder
mergeFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
mergeFrom(Message other)
public
User
.
Builder
mergeFrom
(
Message
other
)
mergeUnknownFields(UnknownFieldSet unknownFields)
public
final
User
.
Builder
mergeUnknownFields
(
UnknownFieldSet
unknownFields
)
setDisplayName(String value)
public
User
.
Builder
setDisplayName
(
String
value
)
Output only. The user's display name.
string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setDisplayNameBytes(ByteString value)
public
User
.
Builder
setDisplayNameBytes
(
ByteString
value
)
Output only. The user's display name.
string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setDomainId(String value)
public
User
.
Builder
setDomainId
(
String
value
)
Unique identifier of the user's Google Workspace domain.
string domain_id = 6;
setDomainIdBytes(ByteString value)
public
User
.
Builder
setDomainIdBytes
(
ByteString
value
)
Unique identifier of the user's Google Workspace domain.
string domain_id = 6;
setField(Descriptors.FieldDescriptor field, Object value)
public
User
.
Builder
setField
(
Descriptors
.
FieldDescriptor
field
,
Object
value
)
setIsAnonymous(boolean value)
public
User
.
Builder
setIsAnonymous
(
boolean
value
)
Output only. When true
, the user is deleted or their profile is not
visible.
bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
setName(String value)
public
User
.
Builder
setName
(
String
value
)
Resource name for a Google Chat user .
Format: users/{user}
. users/app
can be used as an alias for the calling
app bot
user.
For human users
, {user}
is the same
user identifier as:
-
the
id
for the Person in the People API. For example,users/123456789
in Chat API represents the same person as the123456789
Person profile ID in People API. -
the
id
for a user in the Admin SDK Directory API. -
the user's email address can be used as an alias for
{user}
in API requests. For example, if the People API Person profile ID foruser@example.com
is123456789
, you can useusers/user@example.com
as an alias to referenceusers/123456789
. Only the canonical resource name (for exampleusers/123456789
) will be returned from the API.
string name = 1;
setNameBytes(ByteString value)
public
User
.
Builder
setNameBytes
(
ByteString
value
)
Resource name for a Google Chat user .
Format: users/{user}
. users/app
can be used as an alias for the calling
app bot
user.
For human users
, {user}
is the same
user identifier as:
-
the
id
for the Person in the People API. For example,users/123456789
in Chat API represents the same person as the123456789
Person profile ID in People API. -
the
id
for a user in the Admin SDK Directory API. -
the user's email address can be used as an alias for
{user}
in API requests. For example, if the People API Person profile ID foruser@example.com
is123456789
, you can useusers/user@example.com
as an alias to referenceusers/123456789
. Only the canonical resource name (for exampleusers/123456789
) will be returned from the API.
string name = 1;
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public
User
.
Builder
setRepeatedField
(
Descriptors
.
FieldDescriptor
field
,
int
index
,
Object
value
)
setType(User.Type value)
public
User
.
Builder
setType
(
User
.
Type
value
)
User type.
.google.chat.v1.User.Type type = 5;
setTypeValue(int value)
public
User
.
Builder
setTypeValue
(
int
value
)
User type.
.google.chat.v1.User.Type type = 5;
setUnknownFields(UnknownFieldSet unknownFields)
public
final
User
.
Builder
setUnknownFields
(
UnknownFieldSet
unknownFields
)