Class User (0.11.0)

publicfinalclass UserextendsGeneratedMessageV3implementsUserOrBuilder

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

Implements

UserOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

DISPLAY_NAME_FIELD_NUMBER

publicstaticfinalintDISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

DOMAIN_ID_FIELD_NUMBER

publicstaticfinalintDOMAIN_ID_FIELD_NUMBER
Field Value
Type Description
int

IS_ANONYMOUS_FIELD_NUMBER

publicstaticfinalintIS_ANONYMOUS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

publicstaticfinalintTYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticUsergetDefaultInstance()
Returns
Type Description
User

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticUser.BuildernewBuilder()
Returns
Type Description
User.Builder

newBuilder(User prototype)

publicstaticUser.BuildernewBuilder(Userprototype)
Parameter
Name Description
prototype User
Returns
Type Description
User.Builder

parseDelimitedFrom(InputStream input)

publicstaticUserparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
User
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticUserparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticUserparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticUserparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticUserparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticUserparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticUserparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticUserparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticUserparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticUserparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticUserparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticUserparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<User>parser()
Returns
Type Description
Parser<User>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

publicUsergetDefaultInstanceForType()
Returns
Type Description
User

getDisplayName()

publicStringgetDisplayName()

Output only. The user's display name.

string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

publicByteStringgetDisplayNameBytes()

Output only. The user's display name.

string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for displayName.

getDomainId()

publicStringgetDomainId()

Unique identifier of the user's Google Workspace domain.

string domain_id = 6;

Returns
Type Description
String

The domainId.

getDomainIdBytes()

publicByteStringgetDomainIdBytes()

Unique identifier of the user's Google Workspace domain.

string domain_id = 6;

Returns
Type Description
ByteString

The bytes for domainId.

getIsAnonymous()

publicbooleangetIsAnonymous()

Output only. When true, the user is deleted or their profile is not visible.

bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The isAnonymous.

getName()

publicStringgetName()

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 the 123456789 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 for user@example.com is 123456789, you can use users/user@example.com as an alias to reference users/123456789. Only the canonical resource name (for example users/123456789) will be returned from the API.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

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 the 123456789 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 for user@example.com is 123456789, you can use users/user@example.com as an alias to reference users/123456789. Only the canonical resource name (for example users/123456789) will be returned from the API.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

publicParser<User>getParserForType()
Returns
Type Description
Parser<User>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getType()

publicUser.TypegetType()

User type.

.google.chat.v1.User.Type type = 5;

Returns
Type Description
User.Type

The type.

getTypeValue()

publicintgetTypeValue()

User type.

.google.chat.v1.User.Type type = 5;

Returns
Type Description
int

The enum numeric value on the wire for type.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicUser.BuildernewBuilderForType()
Returns
Type Description
User.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedUser.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
User.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicUser.BuildertoBuilder()
Returns
Type Description
User.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.