mirror of
https://github.com/heroiclabs/nakama-java.git
synced 2026-11-24 08:55:49 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1744b1718 | ||
|
|
89f991b3fb | ||
|
|
4b0922cfd0 | ||
|
|
7a001c21dc | ||
|
|
8b21f78867 |
No files matched your search
@@ -6,6 +6,10 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.0.1] - 2019-06-19
|
||||
### Added
|
||||
- Add support for listing expired leaderboard/tournament records.
|
||||
|
||||
## [2.0.0] - 2019-03-29
|
||||
### Added
|
||||
- Support for Nakama 2.
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'com.heroiclabs.nakama'
|
||||
version = '2.0.0'
|
||||
version = '2.0.1'
|
||||
def description = 'Android optimized Java client for Nakama server.'
|
||||
def gopath = System.getenv('GOPATH')
|
||||
sourceCompatibility = 1.7
|
||||
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The request to join a tournament.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.JoinTournamentRequest}
|
||||
*/
|
||||
public final class JoinTournamentRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
JoinTournamentRequest, JoinTournamentRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.JoinTournamentRequest)
|
||||
JoinTournamentRequestOrBuilder {
|
||||
private JoinTournamentRequest() {
|
||||
tournamentId_ = "";
|
||||
}
|
||||
public static final int TOURNAMENT_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String tournamentId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getTournamentId() {
|
||||
return tournamentId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTournamentIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(tournamentId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
private void setTournamentId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
tournamentId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
private void clearTournamentId() {
|
||||
|
||||
tournamentId_ = getDefaultInstance().getTournamentId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
private void setTournamentIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
tournamentId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!tournamentId_.isEmpty()) {
|
||||
output.writeString(1, getTournamentId());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!tournamentId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getTournamentId());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(com.heroiclabs.nakama.api.JoinTournamentRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The request to join a tournament.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.JoinTournamentRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.JoinTournamentRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.JoinTournamentRequest)
|
||||
com.heroiclabs.nakama.api.JoinTournamentRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.JoinTournamentRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getTournamentId() {
|
||||
return instance.getTournamentId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTournamentIdBytes() {
|
||||
return instance.getTournamentIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public Builder setTournamentId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setTournamentId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public Builder clearTournamentId() {
|
||||
copyOnWrite();
|
||||
instance.clearTournamentId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public Builder setTournamentIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setTournamentIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.JoinTournamentRequest)
|
||||
}
|
||||
protected final Object dynamicMethod(
|
||||
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
|
||||
Object arg0, Object arg1) {
|
||||
switch (method) {
|
||||
case NEW_MUTABLE_INSTANCE: {
|
||||
return new com.heroiclabs.nakama.api.JoinTournamentRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.JoinTournamentRequest other = (com.heroiclabs.nakama.api.JoinTournamentRequest) arg1;
|
||||
tournamentId_ = visitor.visitString(!tournamentId_.isEmpty(), tournamentId_,
|
||||
!other.tournamentId_.isEmpty(), other.tournamentId_);
|
||||
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
|
||||
.INSTANCE) {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
case MERGE_FROM_STREAM: {
|
||||
com.google.protobuf.CodedInputStream input =
|
||||
(com.google.protobuf.CodedInputStream) arg0;
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
|
||||
(com.google.protobuf.ExtensionRegistryLite) arg1;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
tournamentId_ = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw new RuntimeException(e.setUnfinishedMessage(this));
|
||||
} catch (java.io.IOException e) {
|
||||
throw new RuntimeException(
|
||||
new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this));
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
case GET_DEFAULT_INSTANCE: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case GET_PARSER: {
|
||||
if (PARSER == null) { synchronized (com.heroiclabs.nakama.api.JoinTournamentRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.JoinTournamentRequest)
|
||||
private static final com.heroiclabs.nakama.api.JoinTournamentRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new JoinTournamentRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.JoinTournamentRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<JoinTournamentRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<JoinTournamentRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface JoinTournamentRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.JoinTournamentRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getTournamentId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to join. The tournament must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTournamentIdBytes();
|
||||
}
|
||||
+825
@@ -0,0 +1,825 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List leaerboard records from a given leaderboard around the owner.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListLeaderboardRecordsAroundOwnerRequest}
|
||||
*/
|
||||
public final class ListLeaderboardRecordsAroundOwnerRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ListLeaderboardRecordsAroundOwnerRequest, ListLeaderboardRecordsAroundOwnerRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ListLeaderboardRecordsAroundOwnerRequest)
|
||||
ListLeaderboardRecordsAroundOwnerRequestOrBuilder {
|
||||
private ListLeaderboardRecordsAroundOwnerRequest() {
|
||||
leaderboardId_ = "";
|
||||
ownerId_ = "";
|
||||
}
|
||||
public static final int LEADERBOARD_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String leaderboardId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getLeaderboardId() {
|
||||
return leaderboardId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(leaderboardId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
private void setLeaderboardId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
leaderboardId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
private void clearLeaderboardId() {
|
||||
|
||||
leaderboardId_ = getDefaultInstance().getLeaderboardId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
private void setLeaderboardIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
leaderboardId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int LIMIT_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.UInt32Value limit_;
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return limit_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.UInt32Value getLimit() {
|
||||
return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(com.google.protobuf.UInt32Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
limit_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(
|
||||
com.google.protobuf.UInt32Value.Builder builderForValue) {
|
||||
limit_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void mergeLimit(com.google.protobuf.UInt32Value value) {
|
||||
if (limit_ != null &&
|
||||
limit_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
|
||||
limit_ =
|
||||
com.google.protobuf.UInt32Value.newBuilder(limit_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
limit_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void clearLimit() { limit_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int OWNER_ID_FIELD_NUMBER = 3;
|
||||
private java.lang.String ownerId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public java.lang.String getOwnerId() {
|
||||
return ownerId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getOwnerIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(ownerId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
private void setOwnerId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
ownerId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
private void clearOwnerId() {
|
||||
|
||||
ownerId_ = getDefaultInstance().getOwnerId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
private void setOwnerIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
ownerId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int EXPIRY_FIELD_NUMBER = 4;
|
||||
private com.google.protobuf.Int64Value expiry_;
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public boolean hasExpiry() {
|
||||
return expiry_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int64Value getExpiry() {
|
||||
return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void setExpiry(com.google.protobuf.Int64Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
expiry_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void setExpiry(
|
||||
com.google.protobuf.Int64Value.Builder builderForValue) {
|
||||
expiry_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void mergeExpiry(com.google.protobuf.Int64Value value) {
|
||||
if (expiry_ != null &&
|
||||
expiry_ != com.google.protobuf.Int64Value.getDefaultInstance()) {
|
||||
expiry_ =
|
||||
com.google.protobuf.Int64Value.newBuilder(expiry_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
expiry_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void clearExpiry() { expiry_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!leaderboardId_.isEmpty()) {
|
||||
output.writeString(1, getLeaderboardId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
output.writeMessage(2, getLimit());
|
||||
}
|
||||
if (!ownerId_.isEmpty()) {
|
||||
output.writeString(3, getOwnerId());
|
||||
}
|
||||
if (expiry_ != null) {
|
||||
output.writeMessage(4, getExpiry());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!leaderboardId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getLeaderboardId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getLimit());
|
||||
}
|
||||
if (!ownerId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getOwnerId());
|
||||
}
|
||||
if (expiry_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(4, getExpiry());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List leaerboard records from a given leaderboard around the owner.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListLeaderboardRecordsAroundOwnerRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ListLeaderboardRecordsAroundOwnerRequest)
|
||||
com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getLeaderboardId() {
|
||||
return instance.getLeaderboardId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes() {
|
||||
return instance.getLeaderboardIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public Builder setLeaderboardId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setLeaderboardId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public Builder clearLeaderboardId() {
|
||||
copyOnWrite();
|
||||
instance.clearLeaderboardId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public Builder setLeaderboardIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setLeaderboardIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return instance.hasLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.UInt32Value getLimit() {
|
||||
return instance.getLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(com.google.protobuf.UInt32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(
|
||||
com.google.protobuf.UInt32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder mergeLimit(com.google.protobuf.UInt32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder clearLimit() { copyOnWrite();
|
||||
instance.clearLimit();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public java.lang.String getOwnerId() {
|
||||
return instance.getOwnerId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getOwnerIdBytes() {
|
||||
return instance.getOwnerIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public Builder setOwnerId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setOwnerId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public Builder clearOwnerId() {
|
||||
copyOnWrite();
|
||||
instance.clearOwnerId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public Builder setOwnerIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setOwnerIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public boolean hasExpiry() {
|
||||
return instance.hasExpiry();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int64Value getExpiry() {
|
||||
return instance.getExpiry();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder setExpiry(com.google.protobuf.Int64Value value) {
|
||||
copyOnWrite();
|
||||
instance.setExpiry(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder setExpiry(
|
||||
com.google.protobuf.Int64Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setExpiry(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder mergeExpiry(com.google.protobuf.Int64Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeExpiry(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder clearExpiry() { copyOnWrite();
|
||||
instance.clearExpiry();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ListLeaderboardRecordsAroundOwnerRequest)
|
||||
}
|
||||
protected final Object dynamicMethod(
|
||||
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
|
||||
Object arg0, Object arg1) {
|
||||
switch (method) {
|
||||
case NEW_MUTABLE_INSTANCE: {
|
||||
return new com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest other = (com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest) arg1;
|
||||
leaderboardId_ = visitor.visitString(!leaderboardId_.isEmpty(), leaderboardId_,
|
||||
!other.leaderboardId_.isEmpty(), other.leaderboardId_);
|
||||
limit_ = visitor.visitMessage(limit_, other.limit_);
|
||||
ownerId_ = visitor.visitString(!ownerId_.isEmpty(), ownerId_,
|
||||
!other.ownerId_.isEmpty(), other.ownerId_);
|
||||
expiry_ = visitor.visitMessage(expiry_, other.expiry_);
|
||||
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
|
||||
.INSTANCE) {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
case MERGE_FROM_STREAM: {
|
||||
com.google.protobuf.CodedInputStream input =
|
||||
(com.google.protobuf.CodedInputStream) arg0;
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
|
||||
(com.google.protobuf.ExtensionRegistryLite) arg1;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
leaderboardId_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.UInt32Value.Builder subBuilder = null;
|
||||
if (limit_ != null) {
|
||||
subBuilder = limit_.toBuilder();
|
||||
}
|
||||
limit_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(limit_);
|
||||
limit_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
ownerId_ = s;
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
com.google.protobuf.Int64Value.Builder subBuilder = null;
|
||||
if (expiry_ != null) {
|
||||
subBuilder = expiry_.toBuilder();
|
||||
}
|
||||
expiry_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(expiry_);
|
||||
expiry_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw new RuntimeException(e.setUnfinishedMessage(this));
|
||||
} catch (java.io.IOException e) {
|
||||
throw new RuntimeException(
|
||||
new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this));
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
case GET_DEFAULT_INSTANCE: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case GET_PARSER: {
|
||||
if (PARSER == null) { synchronized (com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ListLeaderboardRecordsAroundOwnerRequest)
|
||||
private static final com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ListLeaderboardRecordsAroundOwnerRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ListLeaderboardRecordsAroundOwnerRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ListLeaderboardRecordsAroundOwnerRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListLeaderboardRecordsAroundOwnerRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListLeaderboardRecordsAroundOwnerRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getLeaderboardId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.UInt32Value getLimit();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
java.lang.String getOwnerId();
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getOwnerIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
boolean hasExpiry();
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.Int64Value getExpiry();
|
||||
}
|
||||
+166
@@ -349,6 +349,82 @@ public final class ListLeaderboardRecordsRequest extends
|
||||
cursor_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int EXPIRY_FIELD_NUMBER = 5;
|
||||
private com.google.protobuf.Int64Value expiry_;
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public boolean hasExpiry() {
|
||||
return expiry_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int64Value getExpiry() {
|
||||
return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
private void setExpiry(com.google.protobuf.Int64Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
expiry_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
private void setExpiry(
|
||||
com.google.protobuf.Int64Value.Builder builderForValue) {
|
||||
expiry_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
private void mergeExpiry(com.google.protobuf.Int64Value value) {
|
||||
if (expiry_ != null &&
|
||||
expiry_ != com.google.protobuf.Int64Value.getDefaultInstance()) {
|
||||
expiry_ =
|
||||
com.google.protobuf.Int64Value.newBuilder(expiry_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
expiry_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
private void clearExpiry() { expiry_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!leaderboardId_.isEmpty()) {
|
||||
@@ -363,6 +439,9 @@ public final class ListLeaderboardRecordsRequest extends
|
||||
if (!cursor_.isEmpty()) {
|
||||
output.writeString(4, getCursor());
|
||||
}
|
||||
if (expiry_ != null) {
|
||||
output.writeMessage(5, getExpiry());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
@@ -391,6 +470,10 @@ public final class ListLeaderboardRecordsRequest extends
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(4, getCursor());
|
||||
}
|
||||
if (expiry_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(5, getExpiry());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
@@ -778,6 +861,75 @@ public final class ListLeaderboardRecordsRequest extends
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public boolean hasExpiry() {
|
||||
return instance.hasExpiry();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int64Value getExpiry() {
|
||||
return instance.getExpiry();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public Builder setExpiry(com.google.protobuf.Int64Value value) {
|
||||
copyOnWrite();
|
||||
instance.setExpiry(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public Builder setExpiry(
|
||||
com.google.protobuf.Int64Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setExpiry(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public Builder mergeExpiry(com.google.protobuf.Int64Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeExpiry(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
public Builder clearExpiry() { copyOnWrite();
|
||||
instance.clearExpiry();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ListLeaderboardRecordsRequest)
|
||||
}
|
||||
protected final Object dynamicMethod(
|
||||
@@ -806,6 +958,7 @@ public final class ListLeaderboardRecordsRequest extends
|
||||
limit_ = visitor.visitMessage(limit_, other.limit_);
|
||||
cursor_ = visitor.visitString(!cursor_.isEmpty(), cursor_,
|
||||
!other.cursor_.isEmpty(), other.cursor_);
|
||||
expiry_ = visitor.visitMessage(expiry_, other.expiry_);
|
||||
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
|
||||
.INSTANCE) {
|
||||
bitField0_ |= other.bitField0_;
|
||||
@@ -865,6 +1018,19 @@ public final class ListLeaderboardRecordsRequest extends
|
||||
cursor_ = s;
|
||||
break;
|
||||
}
|
||||
case 42: {
|
||||
com.google.protobuf.Int64Value.Builder subBuilder = null;
|
||||
if (expiry_ != null) {
|
||||
subBuilder = expiry_.toBuilder();
|
||||
}
|
||||
expiry_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(expiry_);
|
||||
expiry_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
|
||||
+17
@@ -94,4 +94,21 @@ public interface ListLeaderboardRecordsRequestOrBuilder extends
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
boolean hasExpiry();
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
com.google.protobuf.Int64Value getExpiry();
|
||||
}
|
||||
+825
@@ -0,0 +1,825 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List tournament records from a given tournament around the owner.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListTournamentRecordsAroundOwnerRequest}
|
||||
*/
|
||||
public final class ListTournamentRecordsAroundOwnerRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ListTournamentRecordsAroundOwnerRequest, ListTournamentRecordsAroundOwnerRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ListTournamentRecordsAroundOwnerRequest)
|
||||
ListTournamentRecordsAroundOwnerRequestOrBuilder {
|
||||
private ListTournamentRecordsAroundOwnerRequest() {
|
||||
tournamentId_ = "";
|
||||
ownerId_ = "";
|
||||
}
|
||||
public static final int TOURNAMENT_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String tournamentId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getTournamentId() {
|
||||
return tournamentId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTournamentIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(tournamentId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
private void setTournamentId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
tournamentId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
private void clearTournamentId() {
|
||||
|
||||
tournamentId_ = getDefaultInstance().getTournamentId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
private void setTournamentIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
tournamentId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int LIMIT_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.UInt32Value limit_;
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return limit_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.UInt32Value getLimit() {
|
||||
return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(com.google.protobuf.UInt32Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
limit_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(
|
||||
com.google.protobuf.UInt32Value.Builder builderForValue) {
|
||||
limit_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void mergeLimit(com.google.protobuf.UInt32Value value) {
|
||||
if (limit_ != null &&
|
||||
limit_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
|
||||
limit_ =
|
||||
com.google.protobuf.UInt32Value.newBuilder(limit_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
limit_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
private void clearLimit() { limit_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int OWNER_ID_FIELD_NUMBER = 3;
|
||||
private java.lang.String ownerId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public java.lang.String getOwnerId() {
|
||||
return ownerId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getOwnerIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(ownerId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
private void setOwnerId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
ownerId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
private void clearOwnerId() {
|
||||
|
||||
ownerId_ = getDefaultInstance().getOwnerId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
private void setOwnerIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
ownerId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int EXPIRY_FIELD_NUMBER = 4;
|
||||
private com.google.protobuf.Int64Value expiry_;
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public boolean hasExpiry() {
|
||||
return expiry_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int64Value getExpiry() {
|
||||
return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void setExpiry(com.google.protobuf.Int64Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
expiry_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void setExpiry(
|
||||
com.google.protobuf.Int64Value.Builder builderForValue) {
|
||||
expiry_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void mergeExpiry(com.google.protobuf.Int64Value value) {
|
||||
if (expiry_ != null &&
|
||||
expiry_ != com.google.protobuf.Int64Value.getDefaultInstance()) {
|
||||
expiry_ =
|
||||
com.google.protobuf.Int64Value.newBuilder(expiry_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
expiry_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
private void clearExpiry() { expiry_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!tournamentId_.isEmpty()) {
|
||||
output.writeString(1, getTournamentId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
output.writeMessage(2, getLimit());
|
||||
}
|
||||
if (!ownerId_.isEmpty()) {
|
||||
output.writeString(3, getOwnerId());
|
||||
}
|
||||
if (expiry_ != null) {
|
||||
output.writeMessage(4, getExpiry());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!tournamentId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getTournamentId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getLimit());
|
||||
}
|
||||
if (!ownerId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getOwnerId());
|
||||
}
|
||||
if (expiry_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(4, getExpiry());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List tournament records from a given tournament around the owner.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListTournamentRecordsAroundOwnerRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ListTournamentRecordsAroundOwnerRequest)
|
||||
com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getTournamentId() {
|
||||
return instance.getTournamentId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTournamentIdBytes() {
|
||||
return instance.getTournamentIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public Builder setTournamentId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setTournamentId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public Builder clearTournamentId() {
|
||||
copyOnWrite();
|
||||
instance.clearTournamentId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
public Builder setTournamentIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setTournamentIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return instance.hasLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.UInt32Value getLimit() {
|
||||
return instance.getLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(com.google.protobuf.UInt32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(
|
||||
com.google.protobuf.UInt32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder mergeLimit(com.google.protobuf.UInt32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder clearLimit() { copyOnWrite();
|
||||
instance.clearLimit();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public java.lang.String getOwnerId() {
|
||||
return instance.getOwnerId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getOwnerIdBytes() {
|
||||
return instance.getOwnerIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public Builder setOwnerId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setOwnerId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public Builder clearOwnerId() {
|
||||
copyOnWrite();
|
||||
instance.clearOwnerId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
public Builder setOwnerIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setOwnerIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public boolean hasExpiry() {
|
||||
return instance.hasExpiry();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int64Value getExpiry() {
|
||||
return instance.getExpiry();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder setExpiry(com.google.protobuf.Int64Value value) {
|
||||
copyOnWrite();
|
||||
instance.setExpiry(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder setExpiry(
|
||||
com.google.protobuf.Int64Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setExpiry(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder mergeExpiry(com.google.protobuf.Int64Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeExpiry(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
public Builder clearExpiry() { copyOnWrite();
|
||||
instance.clearExpiry();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ListTournamentRecordsAroundOwnerRequest)
|
||||
}
|
||||
protected final Object dynamicMethod(
|
||||
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
|
||||
Object arg0, Object arg1) {
|
||||
switch (method) {
|
||||
case NEW_MUTABLE_INSTANCE: {
|
||||
return new com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest other = (com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest) arg1;
|
||||
tournamentId_ = visitor.visitString(!tournamentId_.isEmpty(), tournamentId_,
|
||||
!other.tournamentId_.isEmpty(), other.tournamentId_);
|
||||
limit_ = visitor.visitMessage(limit_, other.limit_);
|
||||
ownerId_ = visitor.visitString(!ownerId_.isEmpty(), ownerId_,
|
||||
!other.ownerId_.isEmpty(), other.ownerId_);
|
||||
expiry_ = visitor.visitMessage(expiry_, other.expiry_);
|
||||
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
|
||||
.INSTANCE) {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
case MERGE_FROM_STREAM: {
|
||||
com.google.protobuf.CodedInputStream input =
|
||||
(com.google.protobuf.CodedInputStream) arg0;
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
|
||||
(com.google.protobuf.ExtensionRegistryLite) arg1;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
tournamentId_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.UInt32Value.Builder subBuilder = null;
|
||||
if (limit_ != null) {
|
||||
subBuilder = limit_.toBuilder();
|
||||
}
|
||||
limit_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(limit_);
|
||||
limit_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
ownerId_ = s;
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
com.google.protobuf.Int64Value.Builder subBuilder = null;
|
||||
if (expiry_ != null) {
|
||||
subBuilder = expiry_.toBuilder();
|
||||
}
|
||||
expiry_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(expiry_);
|
||||
expiry_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw new RuntimeException(e.setUnfinishedMessage(this));
|
||||
} catch (java.io.IOException e) {
|
||||
throw new RuntimeException(
|
||||
new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this));
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
case GET_DEFAULT_INSTANCE: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case GET_PARSER: {
|
||||
if (PARSER == null) { synchronized (com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ListTournamentRecordsAroundOwnerRequest)
|
||||
private static final com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ListTournamentRecordsAroundOwnerRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ListTournamentRecordsAroundOwnerRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ListTournamentRecordsAroundOwnerRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListTournamentRecordsAroundOwnerRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListTournamentRecordsAroundOwnerRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getTournamentId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTournamentIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value limit = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.UInt32Value getLimit();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
java.lang.String getOwnerId();
|
||||
/**
|
||||
* <pre>
|
||||
* The owner to retrieve records around.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getOwnerIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
boolean hasExpiry();
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.Int64Value getExpiry();
|
||||
}
|
||||
+1079
File diff suppressed because it is too large.
Load diff
+114
@@ -0,0 +1,114 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListTournamentRecordsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListTournamentRecordsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getTournamentId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTournamentIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* One or more owners to retrieve records for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string owner_ids = 2;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getOwnerIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* One or more owners to retrieve records for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string owner_ids = 2;</code>
|
||||
*/
|
||||
int getOwnerIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* One or more owners to retrieve records for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string owner_ids = 2;</code>
|
||||
*/
|
||||
java.lang.String getOwnerIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* One or more owners to retrieve records for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string owner_ids = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getOwnerIdsBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getLimit();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A next or previous page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* A next or previous page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
boolean hasExpiry();
|
||||
/**
|
||||
* <pre>
|
||||
* Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int64Value expiry = 5;</code>
|
||||
*/
|
||||
com.google.protobuf.Int64Value getExpiry();
|
||||
}
|
||||
+1181
File diff suppressed because it is too large.
Load diff
+112
@@ -0,0 +1,112 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListTournamentsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListTournamentsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The start of the categories to include. Defaults to 0.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value category_start = 1;</code>
|
||||
*/
|
||||
boolean hasCategoryStart();
|
||||
/**
|
||||
* <pre>
|
||||
* The start of the categories to include. Defaults to 0.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value category_start = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.UInt32Value getCategoryStart();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The end of the categories to include. Defaults to 128.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value category_end = 2;</code>
|
||||
*/
|
||||
boolean hasCategoryEnd();
|
||||
/**
|
||||
* <pre>
|
||||
* The end of the categories to include. Defaults to 128.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value category_end = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.UInt32Value getCategoryEnd();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The start time for tournaments. Defaults to epoch.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value start_time = 3;</code>
|
||||
*/
|
||||
boolean hasStartTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The start time for tournaments. Defaults to epoch.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value start_time = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.UInt32Value getStartTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The end time for tournaments. Defaults to +1 year from current Unix time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value end_time = 4;</code>
|
||||
*/
|
||||
boolean hasEndTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The end time for tournaments. Defaults to +1 year from current Unix time.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.UInt32Value end_time = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.UInt32Value getEndTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 6;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 6;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getLimit();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A next page cursor for listings (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 8;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* A next page cursor for listings (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 8;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: apigrpc.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public final class NakamaApiGrpc {
|
||||
private NakamaApiGrpc() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
static {
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
||||
+2115
File diff suppressed because it is too large.
Load diff
+693
@@ -0,0 +1,693 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of tournaments.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.TournamentList}
|
||||
*/
|
||||
public final class TournamentList extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
TournamentList, TournamentList.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.TournamentList)
|
||||
TournamentListOrBuilder {
|
||||
private TournamentList() {
|
||||
tournaments_ = emptyProtobufList();
|
||||
cursor_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int TOURNAMENTS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<com.heroiclabs.nakama.api.Tournament> tournaments_;
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.Tournament> getTournamentsList() {
|
||||
return tournaments_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public java.util.List<? extends com.heroiclabs.nakama.api.TournamentOrBuilder>
|
||||
getTournamentsOrBuilderList() {
|
||||
return tournaments_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public int getTournamentsCount() {
|
||||
return tournaments_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.Tournament getTournaments(int index) {
|
||||
return tournaments_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.TournamentOrBuilder getTournamentsOrBuilder(
|
||||
int index) {
|
||||
return tournaments_.get(index);
|
||||
}
|
||||
private void ensureTournamentsIsMutable() {
|
||||
if (!tournaments_.isModifiable()) {
|
||||
tournaments_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(tournaments_);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void setTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureTournamentsIsMutable();
|
||||
tournaments_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void setTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament.Builder builderForValue) {
|
||||
ensureTournamentsIsMutable();
|
||||
tournaments_.set(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void addTournaments(com.heroiclabs.nakama.api.Tournament value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureTournamentsIsMutable();
|
||||
tournaments_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void addTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureTournamentsIsMutable();
|
||||
tournaments_.add(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void addTournaments(
|
||||
com.heroiclabs.nakama.api.Tournament.Builder builderForValue) {
|
||||
ensureTournamentsIsMutable();
|
||||
tournaments_.add(builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void addTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament.Builder builderForValue) {
|
||||
ensureTournamentsIsMutable();
|
||||
tournaments_.add(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void addAllTournaments(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.Tournament> values) {
|
||||
ensureTournamentsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, tournaments_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void clearTournaments() {
|
||||
tournaments_ = emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
private void removeTournaments(int index) {
|
||||
ensureTournamentsIsMutable();
|
||||
tournaments_.remove(index);
|
||||
}
|
||||
|
||||
public static final int CURSOR_FIELD_NUMBER = 2;
|
||||
private java.lang.String cursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return cursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(cursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
private void setCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
cursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
private void clearCursor() {
|
||||
|
||||
cursor_ = getDefaultInstance().getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
private void setCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
cursor_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < tournaments_.size(); i++) {
|
||||
output.writeMessage(1, tournaments_.get(i));
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
output.writeString(2, getCursor());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
for (int i = 0; i < tournaments_.size(); i++) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, tournaments_.get(i));
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getCursor());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.TournamentList parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(com.heroiclabs.nakama.api.TournamentList prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of tournaments.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.TournamentList}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.TournamentList, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.TournamentList)
|
||||
com.heroiclabs.nakama.api.TournamentListOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.TournamentList.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.Tournament> getTournamentsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getTournamentsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public int getTournamentsCount() {
|
||||
return instance.getTournamentsCount();
|
||||
}/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.Tournament getTournaments(int index) {
|
||||
return instance.getTournaments(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder setTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament value) {
|
||||
copyOnWrite();
|
||||
instance.setTournaments(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder setTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setTournaments(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder addTournaments(com.heroiclabs.nakama.api.Tournament value) {
|
||||
copyOnWrite();
|
||||
instance.addTournaments(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder addTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament value) {
|
||||
copyOnWrite();
|
||||
instance.addTournaments(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder addTournaments(
|
||||
com.heroiclabs.nakama.api.Tournament.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addTournaments(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder addTournaments(
|
||||
int index, com.heroiclabs.nakama.api.Tournament.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addTournaments(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder addAllTournaments(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.Tournament> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllTournaments(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder clearTournaments() {
|
||||
copyOnWrite();
|
||||
instance.clearTournaments();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
public Builder removeTournaments(int index) {
|
||||
copyOnWrite();
|
||||
instance.removeTournaments(index);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return instance.getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return instance.getCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder setCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder clearCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder setCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setCursorBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.TournamentList)
|
||||
}
|
||||
protected final Object dynamicMethod(
|
||||
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
|
||||
Object arg0, Object arg1) {
|
||||
switch (method) {
|
||||
case NEW_MUTABLE_INSTANCE: {
|
||||
return new com.heroiclabs.nakama.api.TournamentList();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
tournaments_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.TournamentList other = (com.heroiclabs.nakama.api.TournamentList) arg1;
|
||||
tournaments_= visitor.visitList(tournaments_, other.tournaments_);
|
||||
cursor_ = visitor.visitString(!cursor_.isEmpty(), cursor_,
|
||||
!other.cursor_.isEmpty(), other.cursor_);
|
||||
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
|
||||
.INSTANCE) {
|
||||
bitField0_ |= other.bitField0_;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
case MERGE_FROM_STREAM: {
|
||||
com.google.protobuf.CodedInputStream input =
|
||||
(com.google.protobuf.CodedInputStream) arg0;
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
|
||||
(com.google.protobuf.ExtensionRegistryLite) arg1;
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!input.skipField(tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
if (!tournaments_.isModifiable()) {
|
||||
tournaments_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(tournaments_);
|
||||
}
|
||||
tournaments_.add(
|
||||
input.readMessage(com.heroiclabs.nakama.api.Tournament.parser(), extensionRegistry));
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
cursor_ = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw new RuntimeException(e.setUnfinishedMessage(this));
|
||||
} catch (java.io.IOException e) {
|
||||
throw new RuntimeException(
|
||||
new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this));
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
case GET_DEFAULT_INSTANCE: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case GET_PARSER: {
|
||||
if (PARSER == null) { synchronized (com.heroiclabs.nakama.api.TournamentList.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.TournamentList)
|
||||
private static final com.heroiclabs.nakama.api.TournamentList DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new TournamentList();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.TournamentList getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<TournamentList> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<TournamentList> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface TournamentListOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.TournamentList)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.Tournament>
|
||||
getTournamentsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.Tournament getTournaments(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The list of tournaments returned.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Tournament tournaments = 1;</code>
|
||||
*/
|
||||
int getTournamentsCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
}
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface TournamentOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.Tournament)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
java.lang.String getId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The title for the tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string title = 2;</code>
|
||||
*/
|
||||
java.lang.String getTitle();
|
||||
/**
|
||||
* <pre>
|
||||
* The title for the tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string title = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTitleBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The description of the tournament. May be blank.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 3;</code>
|
||||
*/
|
||||
java.lang.String getDescription();
|
||||
/**
|
||||
* <pre>
|
||||
* The description of the tournament. May be blank.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getDescriptionBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The category of the tournament. e.g. "vip" could be category 1.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 category = 4;</code>
|
||||
*/
|
||||
int getCategory();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* ASC or DESC sort mode of scores in the tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 sort_order = 5;</code>
|
||||
*/
|
||||
int getSortOrder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The current number of players in the tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 size = 6;</code>
|
||||
*/
|
||||
int getSize();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The maximum number of players for the tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 max_size = 7;</code>
|
||||
*/
|
||||
int getMaxSize();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The maximum score updates allowed per player for the current tournament.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 max_num_score = 8;</code>
|
||||
*/
|
||||
int getMaxNumScore();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* True if the tournament is active and can enter. A computed value.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool can_enter = 9;</code>
|
||||
*/
|
||||
boolean getCanEnter();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament stops being active until next reset. A computed value.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 end_active = 10;</code>
|
||||
*/
|
||||
int getEndActive();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament is next playable. A computed value.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 next_reset = 11;</code>
|
||||
*/
|
||||
int getNextReset();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Additional information stored as a JSON object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string metadata = 12;</code>
|
||||
*/
|
||||
java.lang.String getMetadata();
|
||||
/**
|
||||
* <pre>
|
||||
* Additional information stored as a JSON object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string metadata = 12;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMetadataBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 13;</code>
|
||||
*/
|
||||
boolean hasCreateTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 13;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getCreateTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament will start.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp start_time = 14;</code>
|
||||
*/
|
||||
boolean hasStartTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament will start.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp start_time = 14;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getStartTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament will be stopped.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp end_time = 15;</code>
|
||||
*/
|
||||
boolean hasEndTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament will be stopped.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp end_time = 15;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getEndTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Duration of the tournament in seconds.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 duration = 16;</code>
|
||||
*/
|
||||
int getDuration();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the tournament start being active. A computed value.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 start_active = 17;</code>
|
||||
*/
|
||||
int getStartActive();
|
||||
}
|
||||
+1175
File diff suppressed because it is too large.
Load diff
+97
@@ -0,0 +1,97 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface TournamentRecordListOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.TournamentRecordList)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of tournament records.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord records = 1;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.LeaderboardRecord>
|
||||
getRecordsList();
|
||||
/**
|
||||
* <pre>
|
||||
* A list of tournament records.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord records = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* A list of tournament records.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord records = 1;</code>
|
||||
*/
|
||||
int getRecordsCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A batched set of tournament records belonging to specified owners.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord owner_records = 2;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.LeaderboardRecord>
|
||||
getOwnerRecordsList();
|
||||
/**
|
||||
* <pre>
|
||||
* A batched set of tournament records belonging to specified owners.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord owner_records = 2;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.LeaderboardRecord getOwnerRecords(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* A batched set of tournament records belonging to specified owners.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord owner_records = 2;</code>
|
||||
*/
|
||||
int getOwnerRecordsCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 3;</code>
|
||||
*/
|
||||
java.lang.String getNextCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNextCursorBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 4;</code>
|
||||
*/
|
||||
java.lang.String getPrevCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page (optional).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPrevCursorBytes();
|
||||
}
|
||||
+1071
File diff suppressed because it is too large.
Load diff
+44
@@ -0,0 +1,44 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface WriteTournamentRecordRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.WriteTournamentRecordRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The tournament ID to write the record for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getTournamentId();
|
||||
/**
|
||||
* <pre>
|
||||
* The tournament ID to write the record for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string tournament_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTournamentIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Record input.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2;</code>
|
||||
*/
|
||||
boolean hasRecord();
|
||||
/**
|
||||
* <pre>
|
||||
* Record input.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite getRecord();
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+84
@@ -0,0 +1,84 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -756,10 +756,10 @@ public interface Client {
|
||||
* @param session The session of the user.
|
||||
* @param leaderboardId The id of the leaderboard to list.
|
||||
* @param ownerIds Record owners to fetch with the list of records.
|
||||
* @param limit The number of records to list.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @return A future to resolve leaderboard record objects.
|
||||
*/
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int limit);
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int expiry);
|
||||
|
||||
/**
|
||||
* List records from a leaderboard.
|
||||
@@ -767,11 +767,24 @@ public interface Client {
|
||||
* @param session The session of the user.
|
||||
* @param leaderboardId The id of the leaderboard to list.
|
||||
* @param ownerIds Record owners to fetch with the list of records.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @param limit The number of records to list.
|
||||
* @return A future to resolve leaderboard record objects.
|
||||
*/
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int expiry, final int limit);
|
||||
|
||||
/**
|
||||
* List records from a leaderboard.
|
||||
*
|
||||
* @param session The session of the user.
|
||||
* @param leaderboardId The id of the leaderboard to list.
|
||||
* @param ownerIds Record owners to fetch with the list of records.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @param limit The number of records to list.
|
||||
* @param cursor A cursor for the current position in the leaderboard records to list.
|
||||
* @return A future to resolve leaderboard record objects.
|
||||
*/
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int limit, final String cursor);
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int expiry, final int limit, final String cursor);
|
||||
|
||||
/**
|
||||
* List leaderboard records from a given leaderboard around the owner.
|
||||
@@ -787,10 +800,21 @@ public interface Client {
|
||||
* @param session The session of the user.
|
||||
* @param leaderboardId The id of the leaderboard to list.
|
||||
* @param ownerId The owner to retrieve records around.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @return A future to resolve leaderboard record objects.
|
||||
*/
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecordsAroundOwner(@NonNull final Session session, @NonNull final String leaderboardId, @NonNull final String ownerId, final int expiry);
|
||||
|
||||
/**
|
||||
* List leaderrboard records from a given leaderboard around the owner.
|
||||
* @param session The session of the user.
|
||||
* @param leaderboardId The id of the leaderboard to list.
|
||||
* @param ownerId The owner to retrieve records around.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @param limit Max number of records to return. Between 1 and 100.
|
||||
* @return A future to resolve leaderboard record objects.
|
||||
*/
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecordsAroundOwner(@NonNull final Session session, @NonNull final String leaderboardId, @NonNull final String ownerId, final int limit);
|
||||
ListenableFuture<LeaderboardRecordList> listLeaderboardRecordsAroundOwner(@NonNull final Session session, @NonNull final String leaderboardId, @NonNull final String ownerId, final int expiry, final int limit);
|
||||
|
||||
/**
|
||||
* Fetch a list of matches active on the server.
|
||||
@@ -992,11 +1016,31 @@ public interface Client {
|
||||
* List tournament records from a given tournament.
|
||||
* @param session The session of the user.
|
||||
* @param tournamentId The ID of the tournament to list for.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @return a future which resolved to a tournament record list.
|
||||
*/
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry);
|
||||
|
||||
/**
|
||||
* List tournament records from a given tournament.
|
||||
* @param session The session of the user.
|
||||
* @param tournamentId The ID of the tournament to list for.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @param limit Max number of records to return. Between 1 and 100.
|
||||
* @return a future which resolved to a tournament record list.
|
||||
*/
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry, final int limit);
|
||||
|
||||
/**
|
||||
* List tournament records from a given tournament.
|
||||
* @param session The session of the user.
|
||||
* @param tournamentId The ID of the tournament to list for.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @param limit Max number of records to return. Between 1 and 100.
|
||||
* @param cursor A next or previous page cursor.
|
||||
* @return a future which resolved to a tournament record list.
|
||||
*/
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int limit, final String cursor);
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry, final int limit, final String cursor);
|
||||
|
||||
/**
|
||||
* List tournament records from a given tournament.
|
||||
@@ -1011,12 +1055,13 @@ public interface Client {
|
||||
* List tournament records from a given tournament.
|
||||
* @param session The session of the user.
|
||||
* @param tournamentId The ID of the tournament to list for.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @param limit Max number of records to return. Between 1 and 100.
|
||||
* @param cursor A next or previous page cursor.
|
||||
* @param ownerIds One or more owners to retrieve records for.
|
||||
* @return a future which resolved to a tournament record list.
|
||||
*/
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int limit, final String cursor, @NonNull final String... ownerIds);
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry, final int limit, final String cursor, @NonNull final String... ownerIds);
|
||||
|
||||
/**
|
||||
* List tournament records from a given tournament around the owner.
|
||||
@@ -1032,10 +1077,21 @@ public interface Client {
|
||||
* @param session The session of the user.
|
||||
* @param tournamentId The ID of the tournament to list for.
|
||||
* @param ownerId The owner to retrieve records around.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @return A future to resolve tournament record objects.
|
||||
*/
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecordsAroundOwner(@NonNull final Session session, @NonNull final String tournamentId, @NonNull final String ownerId, final int expiry);
|
||||
|
||||
/**
|
||||
* List tournament records from a given tournament around the owner.
|
||||
* @param session The session of the user.
|
||||
* @param tournamentId The ID of the tournament to list for.
|
||||
* @param ownerId The owner to retrieve records around.
|
||||
* @param expiry Expiry in seconds (since epoch) to begin fetching records from.
|
||||
* @param limit Max number of records to return. Between 1 and 100.
|
||||
* @return A future to resolve tournament record objects.
|
||||
*/
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecordsAroundOwner(@NonNull final Session session, @NonNull final String tournamentId, @NonNull final String ownerId, final int limit);
|
||||
ListenableFuture<TournamentRecordList> listTournamentRecordsAroundOwner(@NonNull final Session session, @NonNull final String tournamentId, @NonNull final String ownerId, final int expiry, final int limit);
|
||||
|
||||
/**
|
||||
* List of groups the current user is a member of.
|
||||
|
||||
@@ -853,25 +853,32 @@ public class DefaultClient implements Client {
|
||||
|
||||
@Override
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId) {
|
||||
return listLeaderboardRecords(session, leaderboardId, null, 0, null);
|
||||
return listLeaderboardRecords(session, leaderboardId, null, -1, 0, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final String... ownerIds) {
|
||||
return listLeaderboardRecords(session, leaderboardId, Arrays.asList(ownerIds), 0, null);
|
||||
return listLeaderboardRecords(session, leaderboardId, Arrays.asList(ownerIds), -1, 0, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int limit) {
|
||||
return listLeaderboardRecords(session, leaderboardId, ownerIds, limit, null);
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int expiry) {
|
||||
return listLeaderboardRecords(session, leaderboardId, ownerIds, expiry, 0, null);
|
||||
}
|
||||
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int expiry, final int limit) {
|
||||
return listLeaderboardRecords(session, leaderboardId, ownerIds, expiry, limit, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int limit, final String cursor) {
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecords(@NonNull final Session session, @NonNull final String leaderboardId, final Iterable<String> ownerIds, final int expiry, final int limit, final String cursor) {
|
||||
final var builder = ListLeaderboardRecordsRequest.newBuilder().setLeaderboardId(leaderboardId);
|
||||
if (ownerIds != null) {
|
||||
builder.addAllOwnerIds(ownerIds);
|
||||
}
|
||||
if (expiry > 0) {
|
||||
builder.setExpiry(Int64Value.newBuilder().setValue(expiry).build());
|
||||
}
|
||||
if (limit > 0) {
|
||||
builder.setLimit(Int32Value.newBuilder().setValue(limit).build());
|
||||
}
|
||||
@@ -883,12 +890,20 @@ public class DefaultClient implements Client {
|
||||
|
||||
@Override
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecordsAroundOwner(final Session session, final String leaderboardId, final String ownerId) {
|
||||
return listLeaderboardRecordsAroundOwner(session, leaderboardId, ownerId, 0);
|
||||
return listLeaderboardRecordsAroundOwner(session, leaderboardId, ownerId, -1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecordsAroundOwner(final Session session, final String leaderboardId, final String ownerId, final int limit) {
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecordsAroundOwner(final Session session, final String leaderboardId, final String ownerId, final int expiry) {
|
||||
return listLeaderboardRecordsAroundOwner(session, leaderboardId, ownerId, expiry, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<LeaderboardRecordList> listLeaderboardRecordsAroundOwner(final Session session, final String leaderboardId, final String ownerId, final int expiry, final int limit) {
|
||||
final var builder = ListLeaderboardRecordsAroundOwnerRequest.newBuilder().setLeaderboardId(leaderboardId).setOwnerId(ownerId);
|
||||
if (expiry > 0) {
|
||||
builder.setExpiry(Int64Value.newBuilder().setValue(expiry).build());
|
||||
}
|
||||
if (limit > 0) {
|
||||
builder.setLimit(UInt32Value.newBuilder().setValue(limit).build());
|
||||
}
|
||||
@@ -1089,13 +1104,25 @@ public class DefaultClient implements Client {
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId) {
|
||||
ListTournamentRecordsRequest.Builder builder = ListTournamentRecordsRequest.newBuilder().setTournamentId(tournamentId);
|
||||
return getStub(session).listTournamentRecords(builder.build());
|
||||
return listTournamentRecords(session, tournamentId, -1, 0, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int limit, final String cursor) {
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry) {
|
||||
return listTournamentRecords(session, tournamentId, expiry, 0, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry, final int limit) {
|
||||
return listTournamentRecords(session, tournamentId, expiry, limit, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry, final int limit, final String cursor) {
|
||||
ListTournamentRecordsRequest.Builder builder = ListTournamentRecordsRequest.newBuilder().setTournamentId(tournamentId);
|
||||
if (expiry > 0) {
|
||||
builder.setExpiry(Int64Value.newBuilder().setValue(expiry).build());
|
||||
}
|
||||
if (limit > 0) {
|
||||
builder.setLimit(Int32Value.newBuilder().setValue(limit).build());
|
||||
}
|
||||
@@ -1115,11 +1142,14 @@ public class DefaultClient implements Client {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int limit, final String cursor, @NonNull final String... ownerIds) {
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecords(@NonNull final Session session, @NonNull final String tournamentId, final int expiry, final int limit, final String cursor, @NonNull final String... ownerIds) {
|
||||
ListTournamentRecordsRequest.Builder builder = ListTournamentRecordsRequest.newBuilder().setTournamentId(tournamentId);
|
||||
if (ownerIds != null) {
|
||||
builder.addAllOwnerIds(Arrays.asList(ownerIds));
|
||||
}
|
||||
if (expiry > 0) {
|
||||
builder.setExpiry(Int64Value.newBuilder().setValue(expiry).build());
|
||||
}
|
||||
if (limit > 0) {
|
||||
builder.setLimit(Int32Value.newBuilder().setValue(limit).build());
|
||||
}
|
||||
@@ -1131,12 +1161,20 @@ public class DefaultClient implements Client {
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecordsAroundOwner(final Session session, final String tournamentId, final String ownerId) {
|
||||
return listTournamentRecordsAroundOwner(session, tournamentId, ownerId, 0);
|
||||
return listTournamentRecordsAroundOwner(session, tournamentId, ownerId, -1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecordsAroundOwner(final Session session, final String tournamentId, final String ownerId, final int limit) {
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecordsAroundOwner(final Session session, final String tournamentId, final String ownerId, final int expiry) {
|
||||
return listTournamentRecordsAroundOwner(session, tournamentId, ownerId, expiry, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<TournamentRecordList> listTournamentRecordsAroundOwner(final Session session, final String tournamentId, final String ownerId, final int expiry, final int limit) {
|
||||
final var builder = ListTournamentRecordsAroundOwnerRequest.newBuilder().setTournamentId(tournamentId).setOwnerId(ownerId);
|
||||
if (expiry > 0) {
|
||||
builder.setExpiry(Int64Value.newBuilder().setValue(expiry).build());
|
||||
}
|
||||
if (limit > 0) {
|
||||
builder.setLimit(UInt32Value.newBuilder().setValue(limit).build());
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ public interface SocketClient {
|
||||
* @param opCode An operation code for the match state.
|
||||
* @param data The new state to send to the match.
|
||||
*/
|
||||
void sendMatchData(@NonNull final String matchId, @NonNull final long opCode, @NonNull byte[] data);
|
||||
void sendMatchData(@NonNull final String matchId, final long opCode, @NonNull byte[] data);
|
||||
|
||||
/**
|
||||
* Send a state change to a match on the server.
|
||||
@@ -230,7 +230,7 @@ public interface SocketClient {
|
||||
* @param data The new state to send to the match.
|
||||
* @param presences The presences in the match to send the state.
|
||||
*/
|
||||
void sendMatchData(@NonNull final String matchId, @NonNull final long opCode, @NonNull byte[] data, UserPresence... presences);
|
||||
void sendMatchData(@NonNull final String matchId, final long opCode, @NonNull byte[] data, UserPresence... presences);
|
||||
|
||||
/**
|
||||
* Send an RPC message to the server.
|
||||
|
||||
@@ -68,8 +68,8 @@ public class WebSocketClient implements SocketClient {
|
||||
private WebSocket socket;
|
||||
private final ExecutorService listenerThreadPoolExec = Executors.newCachedThreadPool();
|
||||
|
||||
WebSocketClient(@NonNull final String host, @NonNull final int port, @NonNull final boolean ssl,
|
||||
@NonNull final int socketTimeoutMs, @NonNull final boolean trace) {
|
||||
WebSocketClient(@NonNull final String host, final int port, final boolean ssl,
|
||||
final int socketTimeoutMs, final boolean trace) {
|
||||
this.host = host;
|
||||
this.port = port;
|
||||
this.ssl = ssl;
|
||||
@@ -466,12 +466,12 @@ public class WebSocketClient implements SocketClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMatchData(@NonNull final String matchId, @NonNull final long opCode, @NonNull final byte[] data) {
|
||||
public void sendMatchData(@NonNull final String matchId, final long opCode, @NonNull final byte[] data) {
|
||||
sendMatchData(matchId, opCode, data, new UserPresence[]{});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMatchData(@NonNull final String matchId, @NonNull final long opCode, @NonNull final byte[] data, final UserPresence... presences) {
|
||||
public void sendMatchData(@NonNull final String matchId, final long opCode, @NonNull final byte[] data, final UserPresence... presences) {
|
||||
final MatchSendMessage msg = new MatchSendMessage(matchId, opCode, data);
|
||||
if (presences != null) {
|
||||
msg.setPresences(Arrays.asList(presences));
|
||||
|
||||
@@ -260,11 +260,25 @@ public class TournamentTest {
|
||||
endTime = new Date().getTime() / 1000; // now
|
||||
tournaments = client.listTournaments(session, categoryStart, categoryEnd, startTime, endTime, 100, null).get();
|
||||
Assert.assertNotNull(tournaments);
|
||||
Assert.assertEquals(tournaments.getTournamentsList().size(), 0);
|
||||
Assert.assertEquals(0, tournaments.getTournamentsList().size());
|
||||
|
||||
sleep(5000);
|
||||
|
||||
endTime = object.end_time;
|
||||
// tournament has ended 2s ago.
|
||||
endTime = 0;
|
||||
tournaments = client.listTournaments(session, categoryStart, categoryEnd, startTime, endTime, 100, null).get();
|
||||
Assert.assertNotNull(tournaments);
|
||||
|
||||
found = false;
|
||||
for (Tournament tt : tournaments.getTournamentsList()) {
|
||||
if (tt.getId().equals(tournamentId)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Assert.assertFalse(found);
|
||||
|
||||
endTime = object.end_time; // tournament has ended 2s ago.
|
||||
tournaments = client.listTournaments(session, categoryStart, categoryEnd, startTime, endTime, 100, null).get();
|
||||
Assert.assertNotNull(tournaments);
|
||||
|
||||
@@ -604,11 +618,15 @@ public class TournamentTest {
|
||||
|
||||
client.writeTournamentRecord(session, tournamentId, 20).get();
|
||||
|
||||
sleep(4 * 1000);
|
||||
sleep(5 * 1000);
|
||||
|
||||
List<LeaderboardRecord> records = client.listLeaderboardRecords(session, tournamentId, session.getUserId()).get().getOwnerRecordsList();
|
||||
Assert.assertEquals(0, records.size());
|
||||
|
||||
List<String> owners = Collections.singletonList(session.getUserId());
|
||||
records = client.listLeaderboardRecords(session, tournamentId, owners, (int)object.end_time).get().getOwnerRecordsList();
|
||||
Assert.assertEquals(1, records.size());
|
||||
|
||||
client.rpc(session, "clientrpc.delete_tournament", "{\"tournament_id\": \"" + tournamentId + "\"}").get();
|
||||
}
|
||||
|
||||
@@ -642,7 +660,7 @@ public class TournamentTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("requires setting token expiry to more than 1min")
|
||||
@Ignore("requires setting token expiry to more than 180s")
|
||||
public void testTournamentWithResetScheduleAndCheckSize() throws Exception {
|
||||
TournamentObject object = new TournamentObject();
|
||||
object.description = "checking set tournament duration 10, reset 1min, ranks calculation.";
|
||||
@@ -751,7 +769,7 @@ public class TournamentTest {
|
||||
|
||||
client.writeTournamentRecord(session, tournamentId, 100).get();
|
||||
|
||||
sleep(object.duration * 1000);
|
||||
sleep((object.duration + 1) * 1000);
|
||||
|
||||
Account account = client.getAccount(session).get();
|
||||
Assert.assertTrue(account.getUser().getMetadata().contains(tournamentId));
|
||||
|
||||
Reference in new issue
Block a user