Package com.heroiclabs.nakama.api
Class Notification.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>
com.heroiclabs.nakama.api.Notification.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,NotificationOrBuilder
,Cloneable
- Enclosing class:
- Notification
public static final class Notification.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>
implements NotificationOrBuilder
A notification in the server.Protobuf type
nakama.api.Notification
-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
Category code for this notification.Content of the notification in JSON.The UNIX time when the notification was created.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) clearId()
ID of the Notification.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) True if this notification was persisted to the database.ID of the sender, if a user.Subject of the notification.clone()
int
getCode()
Category code for this notification.Content of the notification in JSON.com.google.protobuf.ByteString
Content of the notification in JSON.The UNIX time when the notification was created.The UNIX time when the notification was created.The UNIX time when the notification was created.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getId()
ID of the Notification.com.google.protobuf.ByteString
ID of the Notification.boolean
True if this notification was persisted to the database.ID of the sender, if a user.com.google.protobuf.ByteString
ID of the sender, if a user.Subject of the notification.com.google.protobuf.ByteString
Subject of the notification.boolean
The UNIX time when the notification was created.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeCreateTime
(Timestamp value) The UNIX time when the notification was created.mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(Notification other) final Notification.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) setCode
(int value) Category code for this notification.setContent
(String value) Content of the notification in JSON.setContentBytes
(com.google.protobuf.ByteString value) Content of the notification in JSON.setCreateTime
(Timestamp value) The UNIX time when the notification was created.setCreateTime
(Timestamp.Builder builderForValue) The UNIX time when the notification was created.ID of the Notification.setIdBytes
(com.google.protobuf.ByteString value) ID of the Notification.setPersistent
(boolean value) True if this notification was persisted to the database.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setSenderId
(String value) ID of the sender, if a user.setSenderIdBytes
(com.google.protobuf.ByteString value) ID of the sender, if a user.setSubject
(String value) Subject of the notification.setSubjectBytes
(com.google.protobuf.ByteString value) Subject of the notification.final Notification.Builder
setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) 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<Notification.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<Notification.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<Notification.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<Notification.Builder>
-
setField
public Notification.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<Notification.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>
-
setRepeatedField
public Notification.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<Notification.Builder>
-
addRepeatedField
public Notification.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<Notification.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Notification.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>
-
mergeFrom
public Notification.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<Notification.Builder>
- Throws:
IOException
-
getId
ID of the Notification.
string id = 1;
- Specified by:
getId
in interfaceNotificationOrBuilder
- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()ID of the Notification.
string id = 1;
- Specified by:
getIdBytes
in interfaceNotificationOrBuilder
- Returns:
- The bytes for id.
-
setId
ID of the Notification.
string id = 1;
- Parameters:
value
- The id to set.- Returns:
- This builder for chaining.
-
clearId
ID of the Notification.
string id = 1;
- Returns:
- This builder for chaining.
-
setIdBytes
ID of the Notification.
string id = 1;
- Parameters:
value
- The bytes for id to set.- Returns:
- This builder for chaining.
-
getSubject
Subject of the notification.
string subject = 2;
- Specified by:
getSubject
in interfaceNotificationOrBuilder
- Returns:
- The subject.
-
getSubjectBytes
public com.google.protobuf.ByteString getSubjectBytes()Subject of the notification.
string subject = 2;
- Specified by:
getSubjectBytes
in interfaceNotificationOrBuilder
- Returns:
- The bytes for subject.
-
setSubject
Subject of the notification.
string subject = 2;
- Parameters:
value
- The subject to set.- Returns:
- This builder for chaining.
-
clearSubject
Subject of the notification.
string subject = 2;
- Returns:
- This builder for chaining.
-
setSubjectBytes
Subject of the notification.
string subject = 2;
- Parameters:
value
- The bytes for subject to set.- Returns:
- This builder for chaining.
-
getContent
Content of the notification in JSON.
string content = 3;
- Specified by:
getContent
in interfaceNotificationOrBuilder
- Returns:
- The content.
-
getContentBytes
public com.google.protobuf.ByteString getContentBytes()Content of the notification in JSON.
string content = 3;
- Specified by:
getContentBytes
in interfaceNotificationOrBuilder
- Returns:
- The bytes for content.
-
setContent
Content of the notification in JSON.
string content = 3;
- Parameters:
value
- The content to set.- Returns:
- This builder for chaining.
-
clearContent
Content of the notification in JSON.
string content = 3;
- Returns:
- This builder for chaining.
-
setContentBytes
Content of the notification in JSON.
string content = 3;
- Parameters:
value
- The bytes for content to set.- Returns:
- This builder for chaining.
-
getCode
public int getCode()Category code for this notification.
int32 code = 4;
- Specified by:
getCode
in interfaceNotificationOrBuilder
- Returns:
- The code.
-
setCode
Category code for this notification.
int32 code = 4;
- Parameters:
value
- The code to set.- Returns:
- This builder for chaining.
-
clearCode
Category code for this notification.
int32 code = 4;
- Returns:
- This builder for chaining.
-
getSenderId
ID of the sender, if a user. Otherwise 'null'.
string sender_id = 5;
- Specified by:
getSenderId
in interfaceNotificationOrBuilder
- Returns:
- The senderId.
-
getSenderIdBytes
public com.google.protobuf.ByteString getSenderIdBytes()ID of the sender, if a user. Otherwise 'null'.
string sender_id = 5;
- Specified by:
getSenderIdBytes
in interfaceNotificationOrBuilder
- Returns:
- The bytes for senderId.
-
setSenderId
ID of the sender, if a user. Otherwise 'null'.
string sender_id = 5;
- Parameters:
value
- The senderId to set.- Returns:
- This builder for chaining.
-
clearSenderId
ID of the sender, if a user. Otherwise 'null'.
string sender_id = 5;
- Returns:
- This builder for chaining.
-
setSenderIdBytes
ID of the sender, if a user. Otherwise 'null'.
string sender_id = 5;
- Parameters:
value
- The bytes for senderId to set.- Returns:
- This builder for chaining.
-
hasCreateTime
public boolean hasCreateTime()The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
- Specified by:
hasCreateTime
in interfaceNotificationOrBuilder
- Returns:
- Whether the createTime field is set.
-
getCreateTime
The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
- Specified by:
getCreateTime
in interfaceNotificationOrBuilder
- Returns:
- The createTime.
-
setCreateTime
The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
-
setCreateTime
The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
-
mergeCreateTime
The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
-
clearCreateTime
The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
-
getCreateTimeBuilder
The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
-
getCreateTimeOrBuilder
The UNIX time when the notification was created.
.google.protobuf.Timestamp create_time = 6;
- Specified by:
getCreateTimeOrBuilder
in interfaceNotificationOrBuilder
-
getPersistent
public boolean getPersistent()True if this notification was persisted to the database.
bool persistent = 7;
- Specified by:
getPersistent
in interfaceNotificationOrBuilder
- Returns:
- The persistent.
-
setPersistent
True if this notification was persisted to the database.
bool persistent = 7;
- Parameters:
value
- The persistent to set.- Returns:
- This builder for chaining.
-
clearPersistent
True if this notification was persisted to the database.
bool persistent = 7;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final Notification.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>
-
mergeUnknownFields
public final Notification.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>
-