Package com.heroiclabs.nakama.rtapi
Class Channel.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
com.heroiclabs.nakama.rtapi.Channel.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,ChannelOrBuilder
,Cloneable
- Enclosing class:
- Channel
public static final class Channel.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
implements ChannelOrBuilder
A realtime chat channel.Protobuf type
nakama.realtime.Channel
-
Method Summary
Modifier and TypeMethodDescriptionaddAllPresences
(Iterable<? extends UserPresence> values) The users currently in the channel.addPresences
(int index, UserPresence value) The users currently in the channel.addPresences
(int index, UserPresence.Builder builderForValue) The users currently in the channel.addPresences
(UserPresence value) The users currently in the channel.addPresences
(UserPresence.Builder builderForValue) The users currently in the channel.The users currently in the channel.addPresencesBuilder
(int index) The users currently in the channel.addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) The ID of the group, or an empty string if this message was not sent through a group channel.clearId()
The ID of the channel.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) The users currently in the channel.The name of the chat room, or an empty string if this message was not sent through a chat room.A reference to the current user's presence in the channel.The ID of the first DM user, or an empty string if this message was not sent through a DM chat.The ID of the second DM user, or an empty string if this message was not sent through a DM chat.clone()
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
The ID of the group, or an empty string if this message was not sent through a group channel.com.google.protobuf.ByteString
The ID of the group, or an empty string if this message was not sent through a group channel.getId()
The ID of the channel.com.google.protobuf.ByteString
The ID of the channel.getPresences
(int index) The users currently in the channel.getPresencesBuilder
(int index) The users currently in the channel.The users currently in the channel.int
The users currently in the channel.The users currently in the channel.getPresencesOrBuilder
(int index) The users currently in the channel.List<? extends UserPresenceOrBuilder>
The users currently in the channel.The name of the chat room, or an empty string if this message was not sent through a chat room.com.google.protobuf.ByteString
The name of the chat room, or an empty string if this message was not sent through a chat room.getSelf()
A reference to the current user's presence in the channel.A reference to the current user's presence in the channel.A reference to the current user's presence in the channel.The ID of the first DM user, or an empty string if this message was not sent through a DM chat.com.google.protobuf.ByteString
The ID of the first DM user, or an empty string if this message was not sent through a DM chat.The ID of the second DM user, or an empty string if this message was not sent through a DM chat.com.google.protobuf.ByteString
The ID of the second DM user, or an empty string if this message was not sent through a DM chat.boolean
hasSelf()
A reference to the current user's presence in the channel.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeSelf
(UserPresence value) A reference to the current user's presence in the channel.final Channel.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) removePresences
(int index) The users currently in the channel.setGroupId
(String value) The ID of the group, or an empty string if this message was not sent through a group channel.setGroupIdBytes
(com.google.protobuf.ByteString value) The ID of the group, or an empty string if this message was not sent through a group channel.The ID of the channel.setIdBytes
(com.google.protobuf.ByteString value) The ID of the channel.setPresences
(int index, UserPresence value) The users currently in the channel.setPresences
(int index, UserPresence.Builder builderForValue) The users currently in the channel.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setRoomName
(String value) The name of the chat room, or an empty string if this message was not sent through a chat room.setRoomNameBytes
(com.google.protobuf.ByteString value) The name of the chat room, or an empty string if this message was not sent through a chat room.setSelf
(UserPresence value) A reference to the current user's presence in the channel.setSelf
(UserPresence.Builder builderForValue) A reference to the current user's presence in the channel.final Channel.Builder
setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) setUserIdOne
(String value) The ID of the first DM user, or an empty string if this message was not sent through a DM chat.setUserIdOneBytes
(com.google.protobuf.ByteString value) The ID of the first DM user, or an empty string if this message was not sent through a DM chat.setUserIdTwo
(String value) The ID of the second DM user, or an empty string if this message was not sent through a DM chat.setUserIdTwoBytes
(com.google.protobuf.ByteString value) The ID of the second DM user, or an empty string if this message was not sent through a DM chat.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
setField
public Channel.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
setRepeatedField
public Channel.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
addRepeatedField
public Channel.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Channel.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
mergeFrom
public Channel.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Channel.Builder>
- Throws:
IOException
-
getId
The ID of the channel.
string id = 1;
- Specified by:
getId
in interfaceChannelOrBuilder
- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()The ID of the channel.
string id = 1;
- Specified by:
getIdBytes
in interfaceChannelOrBuilder
- Returns:
- The bytes for id.
-
setId
The ID of the channel.
string id = 1;
- Parameters:
value
- The id to set.- Returns:
- This builder for chaining.
-
clearId
The ID of the channel.
string id = 1;
- Returns:
- This builder for chaining.
-
setIdBytes
The ID of the channel.
string id = 1;
- Parameters:
value
- The bytes for id to set.- Returns:
- This builder for chaining.
-
getPresencesList
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
- Specified by:
getPresencesList
in interfaceChannelOrBuilder
-
getPresencesCount
public int getPresencesCount()The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
- Specified by:
getPresencesCount
in interfaceChannelOrBuilder
-
getPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
- Specified by:
getPresences
in interfaceChannelOrBuilder
-
setPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
setPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
addPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
addPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
addPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
addPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
addAllPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
clearPresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
removePresences
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
getPresencesBuilder
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
getPresencesOrBuilder
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
- Specified by:
getPresencesOrBuilder
in interfaceChannelOrBuilder
-
getPresencesOrBuilderList
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
- Specified by:
getPresencesOrBuilderList
in interfaceChannelOrBuilder
-
addPresencesBuilder
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
addPresencesBuilder
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
getPresencesBuilderList
The users currently in the channel.
repeated .nakama.realtime.UserPresence presences = 2;
-
hasSelf
public boolean hasSelf()A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
- Specified by:
hasSelf
in interfaceChannelOrBuilder
- Returns:
- Whether the self field is set.
-
getSelf
A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
- Specified by:
getSelf
in interfaceChannelOrBuilder
- Returns:
- The self.
-
setSelf
A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
-
setSelf
A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
-
mergeSelf
A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
-
clearSelf
A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
-
getSelfBuilder
A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
-
getSelfOrBuilder
A reference to the current user's presence in the channel.
.nakama.realtime.UserPresence self = 3;
- Specified by:
getSelfOrBuilder
in interfaceChannelOrBuilder
-
getRoomName
The name of the chat room, or an empty string if this message was not sent through a chat room.
string room_name = 4;
- Specified by:
getRoomName
in interfaceChannelOrBuilder
- Returns:
- The roomName.
-
getRoomNameBytes
public com.google.protobuf.ByteString getRoomNameBytes()The name of the chat room, or an empty string if this message was not sent through a chat room.
string room_name = 4;
- Specified by:
getRoomNameBytes
in interfaceChannelOrBuilder
- Returns:
- The bytes for roomName.
-
setRoomName
The name of the chat room, or an empty string if this message was not sent through a chat room.
string room_name = 4;
- Parameters:
value
- The roomName to set.- Returns:
- This builder for chaining.
-
clearRoomName
The name of the chat room, or an empty string if this message was not sent through a chat room.
string room_name = 4;
- Returns:
- This builder for chaining.
-
setRoomNameBytes
The name of the chat room, or an empty string if this message was not sent through a chat room.
string room_name = 4;
- Parameters:
value
- The bytes for roomName to set.- Returns:
- This builder for chaining.
-
getGroupId
The ID of the group, or an empty string if this message was not sent through a group channel.
string group_id = 5;
- Specified by:
getGroupId
in interfaceChannelOrBuilder
- Returns:
- The groupId.
-
getGroupIdBytes
public com.google.protobuf.ByteString getGroupIdBytes()The ID of the group, or an empty string if this message was not sent through a group channel.
string group_id = 5;
- Specified by:
getGroupIdBytes
in interfaceChannelOrBuilder
- Returns:
- The bytes for groupId.
-
setGroupId
The ID of the group, or an empty string if this message was not sent through a group channel.
string group_id = 5;
- Parameters:
value
- The groupId to set.- Returns:
- This builder for chaining.
-
clearGroupId
The ID of the group, or an empty string if this message was not sent through a group channel.
string group_id = 5;
- Returns:
- This builder for chaining.
-
setGroupIdBytes
The ID of the group, or an empty string if this message was not sent through a group channel.
string group_id = 5;
- Parameters:
value
- The bytes for groupId to set.- Returns:
- This builder for chaining.
-
getUserIdOne
The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
string user_id_one = 6;
- Specified by:
getUserIdOne
in interfaceChannelOrBuilder
- Returns:
- The userIdOne.
-
getUserIdOneBytes
public com.google.protobuf.ByteString getUserIdOneBytes()The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
string user_id_one = 6;
- Specified by:
getUserIdOneBytes
in interfaceChannelOrBuilder
- Returns:
- The bytes for userIdOne.
-
setUserIdOne
The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
string user_id_one = 6;
- Parameters:
value
- The userIdOne to set.- Returns:
- This builder for chaining.
-
clearUserIdOne
The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
string user_id_one = 6;
- Returns:
- This builder for chaining.
-
setUserIdOneBytes
The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
string user_id_one = 6;
- Parameters:
value
- The bytes for userIdOne to set.- Returns:
- This builder for chaining.
-
getUserIdTwo
The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
string user_id_two = 7;
- Specified by:
getUserIdTwo
in interfaceChannelOrBuilder
- Returns:
- The userIdTwo.
-
getUserIdTwoBytes
public com.google.protobuf.ByteString getUserIdTwoBytes()The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
string user_id_two = 7;
- Specified by:
getUserIdTwoBytes
in interfaceChannelOrBuilder
- Returns:
- The bytes for userIdTwo.
-
setUserIdTwo
The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
string user_id_two = 7;
- Parameters:
value
- The userIdTwo to set.- Returns:
- This builder for chaining.
-
clearUserIdTwo
The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
string user_id_two = 7;
- Returns:
- This builder for chaining.
-
setUserIdTwoBytes
The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
string user_id_two = 7;
- Parameters:
value
- The bytes for userIdTwo to set.- Returns:
- This builder for chaining.
-
setUnknownFields
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Channel.Builder>
-