mirror of
https://github.com/heroiclabs/nakama-java.git
synced 2026-11-24 08:55:49 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc96afe168 | ||
|
|
0b839aaea1 | ||
|
|
3814e6e63a | ||
|
|
d1744b1718 | ||
|
|
89f991b3fb | ||
|
|
4b0922cfd0 | ||
|
|
7a001c21dc | ||
|
|
8b21f78867 | ||
|
|
cb1340d4e6 | ||
|
|
2b47a12a8e | ||
|
|
fc88aba004 | ||
|
|
f7eacd10bd | ||
|
|
ea616f9c93 | ||
|
|
610f177395 | ||
|
|
92ca9f61bc | ||
|
|
37c731878d | ||
|
|
8a7172d8ac | ||
|
|
d4d632aa71 | ||
|
|
991d78b21d | ||
|
|
8c49666f58 | ||
|
|
ed8a11e7de | ||
|
|
4dad9c08ff | ||
|
|
2c209a8848 | ||
|
|
1d2f2132a6 | ||
|
|
a3026badf1 | ||
|
|
ad4cc6c61a | ||
|
|
a063bb6f56 | ||
|
|
cd4ea151c4 | ||
|
|
64a5bdc732 | ||
|
|
642d61bdef | ||
|
|
b1e80ad51f | ||
|
|
e1d754c52e | ||
|
|
fc5f8d2adc | ||
|
|
983c4e9fa2 | ||
|
|
e55764710b | ||
|
|
d29a58f0cc | ||
|
|
4867fca44a | ||
|
|
323bd5f502 | ||
|
|
9aa46b8312 | ||
|
|
4fb96c7182 | ||
|
|
b15777f196 | ||
|
|
747c31aee3 | ||
|
|
54faa2d1f8 | ||
|
|
55b69d693d | ||
|
|
113d21a1e1 | ||
|
|
95a8571b4c | ||
|
|
b8de50d4e0 | ||
|
|
11d758e48c | ||
|
|
6e8e08519b | ||
|
|
0e3e237656 | ||
|
|
8cd7bd7e71 | ||
|
|
d9c2ffe343 | ||
|
|
5f044e2cf7 | ||
|
|
55119792d9 | ||
|
|
38362c56ef |
No files matched your search
+4
-1
@@ -1,5 +1,9 @@
|
||||
# Created by https://www.gitignore.io/api/git,java,macos,linux,gradle,eclipse,windows,sublimetext,intellij+all,intellij+iml
|
||||
|
||||
/src/main/proto/*
|
||||
build/*
|
||||
!build/generated/source/*
|
||||
|
||||
### Custom ###
|
||||
.BINTRAY
|
||||
|
||||
@@ -283,7 +287,6 @@ $RECYCLE.BIN/
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "server"]
|
||||
path = server
|
||||
url = [email protected]:heroiclabs/nakama.git
|
||||
@@ -4,6 +4,49 @@ All notable changes to this project are documented below.
|
||||
|
||||
The format is based on [keep a changelog](http://keepachangelog.com/) and this project uses [semantic versioning](http://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.0.2] - 2019-10-14
|
||||
### Added
|
||||
- Add support for session vars.
|
||||
- Add support for sending metadata when joining a match with an ID.
|
||||
- Add pagination support for friends and groups.
|
||||
|
||||
## [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.
|
||||
|
||||
## [0.5.1] - 2017-12-07
|
||||
### Fixed
|
||||
- Build storage update messages with valid operations.
|
||||
|
||||
## [0.5.0] - 2017-11-21
|
||||
### Added
|
||||
- Support for In-App Notifications feature.
|
||||
- Support for Friends feature.
|
||||
- Support for Groups feature.
|
||||
|
||||
### Changed
|
||||
- Leaderboard sort order is now exposed as an enum rather than a number.
|
||||
|
||||
### Fixed
|
||||
- Use correct name for inconsistently defined topic leave message builder method.
|
||||
|
||||
## [0.4.0] - 2017-11-07
|
||||
### Changed
|
||||
- Expose a simpler interface for identifier fields.
|
||||
|
||||
## [0.3.0] - 2017-10-17
|
||||
### Added
|
||||
- Advanced Matchmaking with custom filters and user properties.
|
||||
|
||||
### Fixed
|
||||
- Improved errors to contain the underlying error reason.
|
||||
|
||||
## [0.2.0] - 2017-09-24
|
||||
### Added
|
||||
- Leaderboard messages.
|
||||
@@ -25,3 +68,4 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
|
||||
## [0.1.0] - 2017-08-13
|
||||
### Added
|
||||
- Initial public release.
|
||||
|
||||
@@ -3,17 +3,21 @@ Nakama Java
|
||||
|
||||
> Android optimized Java client for Nakama server.
|
||||
|
||||
Nakama is an [open-source](https://github.com/heroiclabs/nakama) distributed server for social and realtime games and apps. For more information have a look at the [documentation](https://heroiclabs.com/docs/).
|
||||
[Nakama](https://github.com/heroiclabs/nakama) is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much [more](https://heroiclabs.com).
|
||||
|
||||
This client implements the protocol and all features available in the server. It is compatible with Java 1.7+ and Android 2.3+. The [Javadocs](https://heroiclabs.github.io/nakama-java/current/) for the client are maintained on GitHub Pages.
|
||||
This client implements the full API and socket options with the server. It's written in C# with minimal dependencies to support Unity, Xamarin, Godot, XNA, and other engines and frameworks.
|
||||
|
||||
If you encounter any issues with the server you can generate diagnostics for us with the [doctor](https://heroiclabs.com/docs/install-server-cli/#doctor) subcommand. Send these to support@heroiclabs.com or [open an issue](https://github.com/heroiclabs/nakama/issues). If you experience any issues with the client, it can be useful to [enable trace](https://heroiclabs.com/docs/android-java-client-guide/#logs-and-errors) to produce detailed logs and [open an issue](https://github.com/heroiclabs/nakama-java/issues).
|
||||
Full documentation is online - https://heroiclabs.com/docs
|
||||
|
||||
## Usage
|
||||
## Getting Started
|
||||
|
||||
The client can be downloaded from [GitHub releases](https://github.com/heroiclabs/nakama-java/releases). You can download "nakama-java-$version.jar" or "nakama-java-$version-all.jar" which includes a shadowed copy of all dependencies.
|
||||
You'll need to setup the server and database before you can connect with the client. The simplest way is to use Docker but have a look at the [server documentation](https://github.com/heroiclabs/nakama#getting-started) for other options.
|
||||
|
||||
If you use a build tool like Gradle you can skip the download and fetch it from the central repository.
|
||||
1. Install and run the servers. Follow these [instructions](https://heroiclabs.com/docs/install-docker-quickstart).
|
||||
|
||||
2. Download the client from the [releases page](https://github.com/heroiclabs/nakama-java/releases) and import it into your project. You can also [build from source](#source-builds).
|
||||
|
||||
<!-- Alternatively, if you use a build tool like Gradle you can skip the download and fetch it from the central repository.
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
@@ -28,13 +32,9 @@ dependencies {
|
||||
force = true // don't upgrade to "1.8.0-alpha2"
|
||||
}
|
||||
}
|
||||
```
|
||||
``` -->
|
||||
|
||||
We have a guide which covers how to use the client with lots of code examples:
|
||||
|
||||
https://heroiclabs.com/docs/android-java-client-guide/
|
||||
|
||||
To create a client which can connect to the Nakama server with the default settings.
|
||||
3. Use the connection credentials to build a client object.
|
||||
|
||||
```java
|
||||
import com.heroiclabs.nakama.Client;
|
||||
@@ -43,15 +43,80 @@ public class NakamaSessionManager {
|
||||
private final Client client;
|
||||
|
||||
public NakamaSessionManager() {
|
||||
client = DefaultClient.builder("defaultkey")
|
||||
.host("127.0.0.1")
|
||||
.port(7350)
|
||||
.ssl(false)
|
||||
.build();
|
||||
client = new DefaultClient("defaultkey", "127.0.0.1", 7349, false);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The client object has many methods to execute various features in the server or open realtime socket connections with the server.
|
||||
|
||||
### Authenticate
|
||||
|
||||
There's a variety of ways to [authenticate](https://heroiclabs.com/docs/authentication) with the server. Authentication can create a user if they don't already exist with those credentials. It's also easy to authenticate with a social profile from Google Play Games, Facebook, Game Center, etc.
|
||||
|
||||
```java
|
||||
String email = "[email protected]";
|
||||
String password = "batsignal";
|
||||
Session session = client.authenticateEmail(email, password).get();
|
||||
System.out.println(session);
|
||||
```
|
||||
|
||||
### Sessions
|
||||
|
||||
When authenticated the server responds with an auth token (JWT) which contains useful properties and gets deserialized into a `Session` object.
|
||||
|
||||
```java
|
||||
System.out.println(session.getAuthToken()); // raw JWT token
|
||||
System.out.println(session.getUserId());
|
||||
System.out.println(session.getUsername());
|
||||
System.out.println("Session has expired: " + session.isExpired());
|
||||
System.out.println("Session expires at: " + session.getExpireTime());
|
||||
```
|
||||
|
||||
It is recommended to store the auth token from the session and check at startup if it has expired. If the token has expired you must reauthenticate. The expiry time of the token can be changed as a setting in the server.
|
||||
|
||||
```java
|
||||
String authtoken = "restored from somewhere";
|
||||
Session session = DefaultSession.restore(authtoken);
|
||||
if (session.isExpired()) {
|
||||
System.out.println("Session has expired. Must reauthenticate!");
|
||||
}
|
||||
```
|
||||
|
||||
### Requests
|
||||
|
||||
The client includes lots of builtin APIs for various features of the game server. These can be accessed with the async methods. It can also call custom logic as RPC functions on the server. These can also be executed with a socket object.
|
||||
|
||||
All requests are sent with a session object which authorizes the client.
|
||||
|
||||
```java
|
||||
Account account = client.getAccount(session);
|
||||
System.out.println(account.getUser().getId());
|
||||
System.out.println(account.getUser().getUsername());
|
||||
System.out.println(account.getWallet());
|
||||
```
|
||||
|
||||
### Socket
|
||||
|
||||
The client can create one or more sockets with the server. Each socket can have it's own event listeners registered for responses received from the server.
|
||||
|
||||
```java
|
||||
String host = "localhost";
|
||||
int port = 7350; // different port to the main API port
|
||||
boolean ssl = false;
|
||||
SocketClient socket = client.createSocket(host, port, ssl);
|
||||
ClientListener listener = new AbstractClientListener() {
|
||||
@Override
|
||||
public void onDisconnect(final Throwable t) {
|
||||
System.out.println("Socket disconnected");
|
||||
}
|
||||
};
|
||||
socket.connect(session, listener).get();
|
||||
System.out.println("Socket connected successfully.");
|
||||
```
|
||||
|
||||
### For Android
|
||||
|
||||
Android uses a permissions system which determines which platform services the application will request to use and ask permission for from the user. The client uses the network to communicate with the server so you must add the "INTERNET" permission.
|
||||
@@ -68,6 +133,9 @@ To build the codebase you will need to install these dependencies:
|
||||
* Java Development Kit 1.7+
|
||||
* Gradle build tool
|
||||
|
||||
* Protoc v3.6.0+
|
||||
* [Protoc Java Lite compiler](https://github.com/google/protobuf/blob/master/java/lite.md)
|
||||
|
||||
The Gradle project is setup to download and manage the Google Protocol buffers compiler toolchain automatically and generate Protobuf Lite definitions required by the source code.
|
||||
|
||||
```
|
||||
@@ -75,3 +143,7 @@ $> gradle build
|
||||
```
|
||||
|
||||
Run "gradle tasks" for a list of available build tasks.
|
||||
|
||||
### License
|
||||
|
||||
This project is licensed under the [Apache-2 License](https://github.com/heroiclabs/nakama-dotnet/blob/master/LICENSE).
|
||||
+16
-10
@@ -1,6 +1,7 @@
|
||||
## Release Instructions
|
||||
|
||||
The current release infrastructure is built into the project's [build.gradle](https://github.com/heroiclabs/nakama-java/blob/master/build.gradle). You'll need both the JDK 1.7+ and `gradle` installed to generate release packages which can be uploaded to GitHub and deployed to `"jcenter"`.
|
||||
The current release infrastructure is built into the project's [build.gradle](https://github.com/heroiclabs/nakama-java/blob/master/build.gradle). You'll need both the
|
||||
JDK 1.7+ and `gradle` installed to generate release packages which can be uploaded to GitHub and deployed to `"jcenter"`.
|
||||
|
||||
### New releases
|
||||
|
||||
@@ -18,13 +19,14 @@ The development team use these steps to build and upload a release.
|
||||
|
||||
1. Update the `CHANGELOG.md`.
|
||||
|
||||
Make sure to add the relevant "Added", "Changed", "Deprecated", "Removed", "Fixed", and "Security" sections as suggested by [keep a changelog](http://keepachangelog.com).
|
||||
Make sure to add the relevant "Added", "Changed", "Deprecated", "Removed", "Fixed", and "Security" sections as suggested by [keep a
|
||||
changelog](http://keepachangelog.com).
|
||||
|
||||
2. Update version in `build.gradle` and commit. i.e. `version = '0.1.0'` should become `version = '0.2.0'`.
|
||||
2. Update version in `build.gradle` and commit. i.e. `version = '2.0.0'` should become `version = '2.1.0'`.
|
||||
|
||||
```
|
||||
git add build.gradle CHANGELOG.md
|
||||
git commit -m "Nakama Java 0.2.0 release."
|
||||
git commit -m "Nakama Java 2.0.0 release."
|
||||
```
|
||||
|
||||
3. Tag the release.
|
||||
@@ -32,17 +34,19 @@ The development team use these steps to build and upload a release.
|
||||
__Note__ In source control good semver suggests a `"v"` prefix on a version. It helps group release tags.
|
||||
|
||||
```
|
||||
git tag -a v0.2.0 -m "v0.2.0"
|
||||
git push origin v0.2.0
|
||||
git tag -a v2.0.0 -m "v2.0.0"
|
||||
git push origin v2.0.0
|
||||
```
|
||||
|
||||
4. You can upload the release onto <a href="https://bintray.com/bintray/jcenter" target="\_blank">jcenter</a>. You must set the values in `"gradle.properties"` to your Bintray credentials.
|
||||
4. You can upload the release onto <a href="https://bintray.com/bintray/jcenter" target="\_blank">jcenter</a>. You must set the values in `"gradle.properties"` to your
|
||||
Bintray credentials.
|
||||
|
||||
```
|
||||
gradle -PvcsTag="v0.2.0" bintrayUpload
|
||||
gradle -PvcsTag="v2.0.0" bintrayUpload
|
||||
```
|
||||
|
||||
5. Login and create a [new draft release](https://github.com/heroiclabs/nakama-java/releases/new) on GitHub. Repeat the changelog in the release description. Then publish the release.
|
||||
5. Login and create a [new draft release](https://github.com/heroiclabs/nakama-java/releases/new) on GitHub. Repeat the changelog in the release description. Then publish
|
||||
the release.
|
||||
|
||||
6. Add the previous version of the docs to the `"preserve"` closure in the build script. Deploy the latest Javadoc to GitHub Pages.
|
||||
|
||||
@@ -56,10 +60,12 @@ The development team use these steps to build and upload a release.
|
||||
gradle gitPublishPush
|
||||
```
|
||||
|
||||
7. Add new `## [Unreleased]` section to start of `CHANGELOG.md`. Increment version in `build.gradle` and commit. i.e. `version = '0.2.0'` should now become `version = '0.3.0'`.
|
||||
7. Add new `## [Unreleased]` section to start of `CHANGELOG.md`. Increment version in `build.gradle` and commit. i.e. `version = '2.0.0'` should now become `version =
|
||||
'2.1.0'`.
|
||||
|
||||
```
|
||||
git add build.gradle CHANGELOG.md
|
||||
git commit -m "Set new development version."
|
||||
git push origin master
|
||||
```
|
||||
|
||||
+165
-126
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 Heroic Labs
|
||||
* Copyright 2018 Heroic Labs
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,23 +14,119 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '2.0.1'
|
||||
id 'com.google.protobuf' version '0.8.2'
|
||||
id 'com.jfrog.bintray' version '1.7.3'
|
||||
id 'org.ajoberstar.git-publish' version '0.3.0'
|
||||
id 'java'
|
||||
id 'idea'
|
||||
id 'com.github.johnrengelman.shadow' version '2.0.4'
|
||||
id 'org.ajoberstar.git-publish' version '1.0.1'
|
||||
id 'com.jfrog.bintray' version '1.8.4'
|
||||
id 'maven-publish'
|
||||
id 'com.google.protobuf' version '0.8.6'
|
||||
}
|
||||
|
||||
group = 'com.heroiclabs.nakama'
|
||||
version = '0.2.0'
|
||||
version = '2.0.2'
|
||||
def description = 'Android optimized Java client for Nakama server.'
|
||||
|
||||
def gopath = System.getenv('GOPATH')
|
||||
sourceCompatibility = 1.7
|
||||
targetCompatibility = 1.7
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "https://maven-central.storage-download.googleapis.com/repos/central/data/"
|
||||
}
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.projectlombok:lombok:1.18.2'
|
||||
compile 'com.google.code.gson:gson:2.8.5'
|
||||
compile 'com.google.protobuf:protobuf-lite:3.0.1'
|
||||
compile ('io.grpc:grpc-okhttp:1.14.0') {
|
||||
exclude group: 'com.squareup.okio', module:'okio'
|
||||
}
|
||||
compile 'com.squareup.okio:okio:1.14.0'
|
||||
compile 'com.squareup.okhttp3:okhttp:3.11.0'
|
||||
compile 'io.grpc:grpc-protobuf-lite:1.14.0'
|
||||
compile 'io.grpc:grpc-stub:1.14.0'
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
compile ('com.google.api.grpc:googleapis-common-protos:0.0.3') {
|
||||
exclude group: 'io.grpc', module:'grpc-protobuf'
|
||||
}
|
||||
compile ('org.slf4j:slf4j-api:1.7.25') {
|
||||
force = true // don't upgrade to "1.8.0-alpha2"
|
||||
}
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs 'build/generated/source/proto/main/grpc'
|
||||
srcDirs 'build/generated/source/proto/main/javalite'
|
||||
}
|
||||
proto {
|
||||
srcDir 'src/main/proto'
|
||||
include "${gopath}/src/github.com/grpc-ecosystem/grpc-gateway/"
|
||||
include "${gopath}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
idea {
|
||||
module {
|
||||
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/grpc");
|
||||
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/javalite");
|
||||
}
|
||||
}
|
||||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = 'com.google.protobuf:protoc:3.6.0'
|
||||
}
|
||||
plugins {
|
||||
javalite {
|
||||
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
|
||||
}
|
||||
grpc {
|
||||
artifact = "io.grpc:protoc-gen-grpc-java:1.14.0"
|
||||
}
|
||||
}
|
||||
generateProtoTasks {
|
||||
all().each { task ->
|
||||
task.builtins {
|
||||
remove java // Don't generate a copy with "protobuf-java".
|
||||
}
|
||||
task.plugins {
|
||||
javalite { // Must activate "javalite" plugin.
|
||||
}
|
||||
grpc { // Must activate "grpc" plugin.
|
||||
option 'lite'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'Nakama client',
|
||||
'Implementation-Version': "$project.version"
|
||||
}
|
||||
}
|
||||
|
||||
def pomConfig = {
|
||||
licenses {
|
||||
license {
|
||||
@@ -61,134 +157,77 @@ def pomConfig = {
|
||||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = bintrayUser
|
||||
key = bintrayKey
|
||||
publications = ['mavenJava']
|
||||
pkg {
|
||||
repo = 'default'
|
||||
name = 'nakama-client'
|
||||
desc = description
|
||||
userOrg = 'heroiclabs'
|
||||
licenses = ['Apache-2.0']
|
||||
vcsUrl = 'https://github.com/heroiclabs/nakama-java.git'
|
||||
publicDownloadNumbers = true
|
||||
version {
|
||||
name = "$project.version"
|
||||
released = new Date()
|
||||
vcsTag = project.findProperty('vcsTag')
|
||||
}
|
||||
}
|
||||
}
|
||||
bintray {
|
||||
user = bintrayUser
|
||||
key = bintrayKey
|
||||
publications = ['mavenJava']
|
||||
pkg {
|
||||
repo = 'default'
|
||||
name = 'nakama-client'
|
||||
desc = description
|
||||
userOrg = 'heroiclabs'
|
||||
licenses = ['Apache-2.0']
|
||||
vcsUrl = 'https://github.com/heroiclabs/nakama-java.git'
|
||||
publicDownloadNumbers = true
|
||||
version {
|
||||
name = "$project.version"
|
||||
released = new Date()
|
||||
vcsTag = project.findProperty('vcsTag')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.projectlombok:lombok:1.16.18'
|
||||
compile 'com.google.code.gson:gson:2.8.1'
|
||||
compile 'com.google.protobuf:protobuf-lite:3.0.1'
|
||||
compile 'com.squareup.okhttp3:okhttp:3.8.1'
|
||||
compile 'com.stumbleupon:async:1.4.1'
|
||||
compile ('org.slf4j:slf4j-api:1.7.25') {
|
||||
force = true // don't upgrade to "1.8.0-alpha2"
|
||||
}
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
gitPublish {
|
||||
repoUri = '[email protected]:heroiclabs/nakama-java.git'
|
||||
branch = 'gh-pages'
|
||||
contents {
|
||||
from(javadoc) {
|
||||
into "$project.version"
|
||||
}
|
||||
from(javadoc) {
|
||||
into 'current'
|
||||
}
|
||||
}
|
||||
preserve {
|
||||
include '0.1.0/**'
|
||||
include '0.1.1/**'
|
||||
include '0.1.2/**'
|
||||
include '0.2.0/**'
|
||||
include '0.3.0/**'
|
||||
}
|
||||
commitMessage = "Published javadoc" + project.version + "via Gradle " + GradleVersion.current().version + "."
|
||||
}
|
||||
|
||||
gitPublish {
|
||||
repoUri = '[email protected]:heroiclabs/nakama-java.git'
|
||||
branch = 'gh-pages'
|
||||
contents {
|
||||
from(javadoc) {
|
||||
into "$project.version"
|
||||
}
|
||||
from(javadoc) {
|
||||
into 'current'
|
||||
}
|
||||
}
|
||||
preserve {
|
||||
include '0.1.0/**'
|
||||
include '0.1.1/**'
|
||||
include '0.1.2/**'
|
||||
}
|
||||
commitMessage = "Published javadoc '$project.version' via Gradle ${GradleVersion.current().version}."
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
|
||||
idea {
|
||||
module {
|
||||
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java");
|
||||
}
|
||||
}
|
||||
artifact sourcesJar {
|
||||
classifier 'sources'
|
||||
}
|
||||
artifact javadocJar {
|
||||
classifier 'javadoc'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'Nakama client',
|
||||
'Implementation-Version': "$project.version"
|
||||
}
|
||||
}
|
||||
groupId "$project.group"
|
||||
artifactId 'client'
|
||||
version "$project.version"
|
||||
|
||||
protobuf {
|
||||
generateProtoTasks {
|
||||
all().each { task ->
|
||||
task.builtins {
|
||||
remove java // Don't generate a copy with "protobuf-java".
|
||||
}
|
||||
task.plugins {
|
||||
javalite { // Must activate "javalite" plugin.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
javalite {
|
||||
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
|
||||
}
|
||||
}
|
||||
protoc {
|
||||
artifact = 'com.google.protobuf:protoc:3.3.0'
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
|
||||
artifact sourcesJar {
|
||||
classifier 'sources'
|
||||
}
|
||||
artifact javadocJar {
|
||||
classifier 'javadoc'
|
||||
}
|
||||
|
||||
groupId "$project.group"
|
||||
artifactId 'client'
|
||||
version "$project.version"
|
||||
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('description', description)
|
||||
root.appendNode('name', 'Nakama client')
|
||||
root.appendNode('url', 'https://heroiclabs.com/docs/android-java-client-guide/')
|
||||
root.children().last() + pomConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('description', description)
|
||||
root.appendNode('name', 'Nakama client')
|
||||
root.appendNode('url', 'https://heroiclabs.com/docs/android-java-client-guide/')
|
||||
root.children().last() + pomConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
proto {
|
||||
srcDir "$projectDir/server/server"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allJava
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+599
@@ -0,0 +1,599 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a custom ID to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountCustom}
|
||||
*/
|
||||
public final class AccountCustom extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AccountCustom, AccountCustom.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AccountCustom)
|
||||
AccountCustomOrBuilder {
|
||||
private AccountCustom() {
|
||||
id_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String id_;
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getId() {
|
||||
return id_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(id_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
private void setId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
id_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
private void clearId() {
|
||||
|
||||
id_ = getDefaultInstance().getId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
private void setIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
id_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int VARS_FIELD_NUMBER = 2;
|
||||
private static final class VarsDefaultEntryHolder {
|
||||
static final com.google.protobuf.MapEntryLite<
|
||||
java.lang.String, java.lang.String> defaultEntry =
|
||||
com.google.protobuf.MapEntryLite
|
||||
.<java.lang.String, java.lang.String>newDefaultInstance(
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"",
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"");
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<
|
||||
java.lang.String, java.lang.String> vars_ =
|
||||
com.google.protobuf.MapFieldLite.emptyMapField();
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetVars() {
|
||||
return vars_;
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetMutableVars() {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
return vars_;
|
||||
}
|
||||
|
||||
public int getVarsCount() {
|
||||
return internalGetVars().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return internalGetVars().containsKey(key);
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
internalGetVars());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
private java.util.Map<java.lang.String, java.lang.String>
|
||||
getMutableVarsMap() {
|
||||
return internalGetMutableVars();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!id_.isEmpty()) {
|
||||
output.writeString(1, getId());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
VarsDefaultEntryHolder.defaultEntry.serializeTo(
|
||||
output, 2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!id_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getId());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
size += VarsDefaultEntryHolder.defaultEntry.computeMessageSize(
|
||||
2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountCustom 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.AccountCustom 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.AccountCustom parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountCustom 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.AccountCustom parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountCustom 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.AccountCustom parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountCustom 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.AccountCustom 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.AccountCustom 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.AccountCustom prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a custom ID to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountCustom}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AccountCustom, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AccountCustom)
|
||||
com.heroiclabs.nakama.api.AccountCustomOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AccountCustom.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getId() {
|
||||
return instance.getId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdBytes() {
|
||||
return instance.getIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public Builder setId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public Builder clearId() {
|
||||
copyOnWrite();
|
||||
instance.clearId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public Builder setIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public int getVarsCount() {
|
||||
return instance.getVarsMap().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return instance.getVarsMap().containsKey(key);
|
||||
}
|
||||
|
||||
public Builder clearVars() {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().clear();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public Builder removeVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().remove(key);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
instance.getVarsMap());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putVars(
|
||||
java.lang.String key,
|
||||
java.lang.String value) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
if (value == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().put(key, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putAllVars(
|
||||
java.util.Map<java.lang.String, java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().putAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AccountCustom)
|
||||
}
|
||||
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.AccountCustom();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
vars_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AccountCustom other = (com.heroiclabs.nakama.api.AccountCustom) arg1;
|
||||
id_ = visitor.visitString(!id_.isEmpty(), id_,
|
||||
!other.id_.isEmpty(), other.id_);
|
||||
vars_ = visitor.visitMap(
|
||||
vars_, other.internalGetVars());
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
id_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
VarsDefaultEntryHolder.defaultEntry.parseInto(vars_, input, extensionRegistry); 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.AccountCustom.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AccountCustom)
|
||||
private static final com.heroiclabs.nakama.api.AccountCustom DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AccountCustom();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountCustom getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AccountCustom> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AccountCustom> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountCustomOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AccountCustom)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
java.lang.String getId();
|
||||
/**
|
||||
* <pre>
|
||||
* A custom identifier.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
int getVarsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
boolean containsVars(
|
||||
java.lang.String key);
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVars();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVarsMap();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue);
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrThrow(
|
||||
java.lang.String key);
|
||||
}
|
||||
+599
@@ -0,0 +1,599 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a device to the server. Used with authenticate/link/unlink and user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountDevice}
|
||||
*/
|
||||
public final class AccountDevice extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AccountDevice, AccountDevice.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AccountDevice)
|
||||
AccountDeviceOrBuilder {
|
||||
private AccountDevice() {
|
||||
id_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String id_;
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getId() {
|
||||
return id_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(id_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
private void setId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
id_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
private void clearId() {
|
||||
|
||||
id_ = getDefaultInstance().getId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
private void setIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
id_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int VARS_FIELD_NUMBER = 2;
|
||||
private static final class VarsDefaultEntryHolder {
|
||||
static final com.google.protobuf.MapEntryLite<
|
||||
java.lang.String, java.lang.String> defaultEntry =
|
||||
com.google.protobuf.MapEntryLite
|
||||
.<java.lang.String, java.lang.String>newDefaultInstance(
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"",
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"");
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<
|
||||
java.lang.String, java.lang.String> vars_ =
|
||||
com.google.protobuf.MapFieldLite.emptyMapField();
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetVars() {
|
||||
return vars_;
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetMutableVars() {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
return vars_;
|
||||
}
|
||||
|
||||
public int getVarsCount() {
|
||||
return internalGetVars().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return internalGetVars().containsKey(key);
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
internalGetVars());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
private java.util.Map<java.lang.String, java.lang.String>
|
||||
getMutableVarsMap() {
|
||||
return internalGetMutableVars();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!id_.isEmpty()) {
|
||||
output.writeString(1, getId());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
VarsDefaultEntryHolder.defaultEntry.serializeTo(
|
||||
output, 2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!id_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getId());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
size += VarsDefaultEntryHolder.defaultEntry.computeMessageSize(
|
||||
2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountDevice 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.AccountDevice 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.AccountDevice parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountDevice 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.AccountDevice parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountDevice 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.AccountDevice parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountDevice 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.AccountDevice 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.AccountDevice 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.AccountDevice prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a device to the server. Used with authenticate/link/unlink and user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountDevice}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AccountDevice, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AccountDevice)
|
||||
com.heroiclabs.nakama.api.AccountDeviceOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AccountDevice.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getId() {
|
||||
return instance.getId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdBytes() {
|
||||
return instance.getIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public Builder setId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public Builder clearId() {
|
||||
copyOnWrite();
|
||||
instance.clearId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
public Builder setIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public int getVarsCount() {
|
||||
return instance.getVarsMap().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return instance.getVarsMap().containsKey(key);
|
||||
}
|
||||
|
||||
public Builder clearVars() {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().clear();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public Builder removeVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().remove(key);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
instance.getVarsMap());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putVars(
|
||||
java.lang.String key,
|
||||
java.lang.String value) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
if (value == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().put(key, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putAllVars(
|
||||
java.util.Map<java.lang.String, java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().putAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AccountDevice)
|
||||
}
|
||||
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.AccountDevice();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
vars_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AccountDevice other = (com.heroiclabs.nakama.api.AccountDevice) arg1;
|
||||
id_ = visitor.visitString(!id_.isEmpty(), id_,
|
||||
!other.id_.isEmpty(), other.id_);
|
||||
vars_ = visitor.visitMap(
|
||||
vars_, other.internalGetVars());
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
id_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
VarsDefaultEntryHolder.defaultEntry.parseInto(vars_, input, extensionRegistry); 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.AccountDevice.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AccountDevice)
|
||||
private static final com.heroiclabs.nakama.api.AccountDevice DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AccountDevice();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountDevice getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AccountDevice> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AccountDevice> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountDeviceOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AccountDevice)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
java.lang.String getId();
|
||||
/**
|
||||
* <pre>
|
||||
* A device identifier. Should be obtained by a platform-specific device API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
int getVarsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
boolean containsVars(
|
||||
java.lang.String key);
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVars();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVarsMap();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue);
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrThrow(
|
||||
java.lang.String key);
|
||||
}
|
||||
+741
@@ -0,0 +1,741 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send an email with password to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountEmail}
|
||||
*/
|
||||
public final class AccountEmail extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AccountEmail, AccountEmail.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AccountEmail)
|
||||
AccountEmailOrBuilder {
|
||||
private AccountEmail() {
|
||||
email_ = "";
|
||||
password_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int EMAIL_FIELD_NUMBER = 1;
|
||||
private java.lang.String email_;
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
public java.lang.String getEmail() {
|
||||
return email_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getEmailBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(email_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
private void setEmail(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
email_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
private void clearEmail() {
|
||||
|
||||
email_ = getDefaultInstance().getEmail();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
private void setEmailBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
email_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int PASSWORD_FIELD_NUMBER = 2;
|
||||
private java.lang.String password_;
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
public java.lang.String getPassword() {
|
||||
return password_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getPasswordBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(password_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
private void setPassword(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
password_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
private void clearPassword() {
|
||||
|
||||
password_ = getDefaultInstance().getPassword();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
private void setPasswordBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
password_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int VARS_FIELD_NUMBER = 3;
|
||||
private static final class VarsDefaultEntryHolder {
|
||||
static final com.google.protobuf.MapEntryLite<
|
||||
java.lang.String, java.lang.String> defaultEntry =
|
||||
com.google.protobuf.MapEntryLite
|
||||
.<java.lang.String, java.lang.String>newDefaultInstance(
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"",
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"");
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<
|
||||
java.lang.String, java.lang.String> vars_ =
|
||||
com.google.protobuf.MapFieldLite.emptyMapField();
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetVars() {
|
||||
return vars_;
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetMutableVars() {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
return vars_;
|
||||
}
|
||||
|
||||
public int getVarsCount() {
|
||||
return internalGetVars().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return internalGetVars().containsKey(key);
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
internalGetVars());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
private java.util.Map<java.lang.String, java.lang.String>
|
||||
getMutableVarsMap() {
|
||||
return internalGetMutableVars();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!email_.isEmpty()) {
|
||||
output.writeString(1, getEmail());
|
||||
}
|
||||
if (!password_.isEmpty()) {
|
||||
output.writeString(2, getPassword());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
VarsDefaultEntryHolder.defaultEntry.serializeTo(
|
||||
output, 3, entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!email_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getEmail());
|
||||
}
|
||||
if (!password_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getPassword());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
size += VarsDefaultEntryHolder.defaultEntry.computeMessageSize(
|
||||
3, entry.getKey(), entry.getValue());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountEmail 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.AccountEmail 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.AccountEmail parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountEmail 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.AccountEmail parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountEmail 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.AccountEmail parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountEmail 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.AccountEmail 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.AccountEmail 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.AccountEmail prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send an email with password to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountEmail}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AccountEmail, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AccountEmail)
|
||||
com.heroiclabs.nakama.api.AccountEmailOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AccountEmail.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
public java.lang.String getEmail() {
|
||||
return instance.getEmail();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getEmailBytes() {
|
||||
return instance.getEmailBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
public Builder setEmail(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setEmail(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
public Builder clearEmail() {
|
||||
copyOnWrite();
|
||||
instance.clearEmail();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
public Builder setEmailBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setEmailBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
public java.lang.String getPassword() {
|
||||
return instance.getPassword();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getPasswordBytes() {
|
||||
return instance.getPasswordBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
public Builder setPassword(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setPassword(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
public Builder clearPassword() {
|
||||
copyOnWrite();
|
||||
instance.clearPassword();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
public Builder setPasswordBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setPasswordBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public int getVarsCount() {
|
||||
return instance.getVarsMap().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return instance.getVarsMap().containsKey(key);
|
||||
}
|
||||
|
||||
public Builder clearVars() {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().clear();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public Builder removeVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().remove(key);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
instance.getVarsMap());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
public Builder putVars(
|
||||
java.lang.String key,
|
||||
java.lang.String value) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
if (value == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().put(key, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
public Builder putAllVars(
|
||||
java.util.Map<java.lang.String, java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().putAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AccountEmail)
|
||||
}
|
||||
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.AccountEmail();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
vars_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AccountEmail other = (com.heroiclabs.nakama.api.AccountEmail) arg1;
|
||||
email_ = visitor.visitString(!email_.isEmpty(), email_,
|
||||
!other.email_.isEmpty(), other.email_);
|
||||
password_ = visitor.visitString(!password_.isEmpty(), password_,
|
||||
!other.password_.isEmpty(), other.password_);
|
||||
vars_ = visitor.visitMap(
|
||||
vars_, other.internalGetVars());
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
email_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
password_ = s;
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
VarsDefaultEntryHolder.defaultEntry.parseInto(vars_, input, extensionRegistry); 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.AccountEmail.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AccountEmail)
|
||||
private static final com.heroiclabs.nakama.api.AccountEmail DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AccountEmail();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountEmail getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AccountEmail> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AccountEmail> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountEmailOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AccountEmail)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
java.lang.String getEmail();
|
||||
/**
|
||||
* <pre>
|
||||
* A valid RFC-5322 email address.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getEmailBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
java.lang.String getPassword();
|
||||
/**
|
||||
* <pre>
|
||||
* A password for the user account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string password = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPasswordBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
int getVarsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
boolean containsVars(
|
||||
java.lang.String key);
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVars();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVarsMap();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue);
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 3;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrThrow(
|
||||
java.lang.String key);
|
||||
}
|
||||
+599
@@ -0,0 +1,599 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a Facebook token to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountFacebook}
|
||||
*/
|
||||
public final class AccountFacebook extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AccountFacebook, AccountFacebook.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AccountFacebook)
|
||||
AccountFacebookOrBuilder {
|
||||
private AccountFacebook() {
|
||||
token_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int TOKEN_FIELD_NUMBER = 1;
|
||||
private java.lang.String token_;
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public java.lang.String getToken() {
|
||||
return token_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTokenBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(token_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void setToken(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
token_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void clearToken() {
|
||||
|
||||
token_ = getDefaultInstance().getToken();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void setTokenBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
token_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int VARS_FIELD_NUMBER = 2;
|
||||
private static final class VarsDefaultEntryHolder {
|
||||
static final com.google.protobuf.MapEntryLite<
|
||||
java.lang.String, java.lang.String> defaultEntry =
|
||||
com.google.protobuf.MapEntryLite
|
||||
.<java.lang.String, java.lang.String>newDefaultInstance(
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"",
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"");
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<
|
||||
java.lang.String, java.lang.String> vars_ =
|
||||
com.google.protobuf.MapFieldLite.emptyMapField();
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetVars() {
|
||||
return vars_;
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetMutableVars() {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
return vars_;
|
||||
}
|
||||
|
||||
public int getVarsCount() {
|
||||
return internalGetVars().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return internalGetVars().containsKey(key);
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
internalGetVars());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
private java.util.Map<java.lang.String, java.lang.String>
|
||||
getMutableVarsMap() {
|
||||
return internalGetMutableVars();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!token_.isEmpty()) {
|
||||
output.writeString(1, getToken());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
VarsDefaultEntryHolder.defaultEntry.serializeTo(
|
||||
output, 2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!token_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getToken());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
size += VarsDefaultEntryHolder.defaultEntry.computeMessageSize(
|
||||
2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountFacebook 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.AccountFacebook 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.AccountFacebook parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountFacebook 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.AccountFacebook parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountFacebook 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.AccountFacebook parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountFacebook 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.AccountFacebook 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.AccountFacebook 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.AccountFacebook prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a Facebook token to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountFacebook}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AccountFacebook, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AccountFacebook)
|
||||
com.heroiclabs.nakama.api.AccountFacebookOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AccountFacebook.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public java.lang.String getToken() {
|
||||
return instance.getToken();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTokenBytes() {
|
||||
return instance.getTokenBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder setToken(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setToken(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder clearToken() {
|
||||
copyOnWrite();
|
||||
instance.clearToken();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder setTokenBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setTokenBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public int getVarsCount() {
|
||||
return instance.getVarsMap().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return instance.getVarsMap().containsKey(key);
|
||||
}
|
||||
|
||||
public Builder clearVars() {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().clear();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public Builder removeVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().remove(key);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
instance.getVarsMap());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putVars(
|
||||
java.lang.String key,
|
||||
java.lang.String value) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
if (value == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().put(key, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putAllVars(
|
||||
java.util.Map<java.lang.String, java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().putAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AccountFacebook)
|
||||
}
|
||||
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.AccountFacebook();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
vars_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AccountFacebook other = (com.heroiclabs.nakama.api.AccountFacebook) arg1;
|
||||
token_ = visitor.visitString(!token_.isEmpty(), token_,
|
||||
!other.token_.isEmpty(), other.token_);
|
||||
vars_ = visitor.visitMap(
|
||||
vars_, other.internalGetVars());
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
token_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
VarsDefaultEntryHolder.defaultEntry.parseInto(vars_, input, extensionRegistry); 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.AccountFacebook.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AccountFacebook)
|
||||
private static final com.heroiclabs.nakama.api.AccountFacebook DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AccountFacebook();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountFacebook getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AccountFacebook> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AccountFacebook> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountFacebookOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AccountFacebook)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
java.lang.String getToken();
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Facebook to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTokenBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
int getVarsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
boolean containsVars(
|
||||
java.lang.String key);
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVars();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVarsMap();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue);
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrThrow(
|
||||
java.lang.String key);
|
||||
}
|
||||
+1251
File diff suppressed because it is too large.
Load diff
+162
@@ -0,0 +1,162 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountGameCenterOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AccountGameCenter)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Player ID (generated by GameCenter).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string player_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getPlayerId();
|
||||
/**
|
||||
* <pre>
|
||||
* Player ID (generated by GameCenter).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string player_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPlayerIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Bundle ID (generated by GameCenter).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string bundle_id = 2;</code>
|
||||
*/
|
||||
java.lang.String getBundleId();
|
||||
/**
|
||||
* <pre>
|
||||
* Bundle ID (generated by GameCenter).
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string bundle_id = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getBundleIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Time since UNIX epoch when the signature was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int64 timestamp_seconds = 3;</code>
|
||||
*/
|
||||
long getTimestampSeconds();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A random "NSString" used to compute the hash and keep it randomized.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string salt = 4;</code>
|
||||
*/
|
||||
java.lang.String getSalt();
|
||||
/**
|
||||
* <pre>
|
||||
* A random "NSString" used to compute the hash and keep it randomized.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string salt = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getSaltBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The verification signature data generated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string signature = 5;</code>
|
||||
*/
|
||||
java.lang.String getSignature();
|
||||
/**
|
||||
* <pre>
|
||||
* The verification signature data generated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string signature = 5;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getSignatureBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The URL for the public encryption key.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string public_key_url = 6;</code>
|
||||
*/
|
||||
java.lang.String getPublicKeyUrl();
|
||||
/**
|
||||
* <pre>
|
||||
* The URL for the public encryption key.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string public_key_url = 6;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPublicKeyUrlBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 7;</code>
|
||||
*/
|
||||
int getVarsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 7;</code>
|
||||
*/
|
||||
boolean containsVars(
|
||||
java.lang.String key);
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVars();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 7;</code>
|
||||
*/
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVarsMap();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 7;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue);
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 7;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrThrow(
|
||||
java.lang.String key);
|
||||
}
|
||||
+599
@@ -0,0 +1,599 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a Google token to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountGoogle}
|
||||
*/
|
||||
public final class AccountGoogle extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AccountGoogle, AccountGoogle.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AccountGoogle)
|
||||
AccountGoogleOrBuilder {
|
||||
private AccountGoogle() {
|
||||
token_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int TOKEN_FIELD_NUMBER = 1;
|
||||
private java.lang.String token_;
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public java.lang.String getToken() {
|
||||
return token_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTokenBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(token_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void setToken(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
token_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void clearToken() {
|
||||
|
||||
token_ = getDefaultInstance().getToken();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void setTokenBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
token_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int VARS_FIELD_NUMBER = 2;
|
||||
private static final class VarsDefaultEntryHolder {
|
||||
static final com.google.protobuf.MapEntryLite<
|
||||
java.lang.String, java.lang.String> defaultEntry =
|
||||
com.google.protobuf.MapEntryLite
|
||||
.<java.lang.String, java.lang.String>newDefaultInstance(
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"",
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"");
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<
|
||||
java.lang.String, java.lang.String> vars_ =
|
||||
com.google.protobuf.MapFieldLite.emptyMapField();
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetVars() {
|
||||
return vars_;
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetMutableVars() {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
return vars_;
|
||||
}
|
||||
|
||||
public int getVarsCount() {
|
||||
return internalGetVars().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return internalGetVars().containsKey(key);
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
internalGetVars());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
private java.util.Map<java.lang.String, java.lang.String>
|
||||
getMutableVarsMap() {
|
||||
return internalGetMutableVars();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!token_.isEmpty()) {
|
||||
output.writeString(1, getToken());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
VarsDefaultEntryHolder.defaultEntry.serializeTo(
|
||||
output, 2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!token_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getToken());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
size += VarsDefaultEntryHolder.defaultEntry.computeMessageSize(
|
||||
2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountGoogle 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.AccountGoogle 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.AccountGoogle parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountGoogle 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.AccountGoogle parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountGoogle 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.AccountGoogle parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountGoogle 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.AccountGoogle 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.AccountGoogle 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.AccountGoogle prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a Google token to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountGoogle}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AccountGoogle, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AccountGoogle)
|
||||
com.heroiclabs.nakama.api.AccountGoogleOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AccountGoogle.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public java.lang.String getToken() {
|
||||
return instance.getToken();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTokenBytes() {
|
||||
return instance.getTokenBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder setToken(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setToken(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder clearToken() {
|
||||
copyOnWrite();
|
||||
instance.clearToken();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder setTokenBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setTokenBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public int getVarsCount() {
|
||||
return instance.getVarsMap().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return instance.getVarsMap().containsKey(key);
|
||||
}
|
||||
|
||||
public Builder clearVars() {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().clear();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public Builder removeVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().remove(key);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
instance.getVarsMap());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putVars(
|
||||
java.lang.String key,
|
||||
java.lang.String value) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
if (value == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().put(key, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putAllVars(
|
||||
java.util.Map<java.lang.String, java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().putAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AccountGoogle)
|
||||
}
|
||||
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.AccountGoogle();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
vars_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AccountGoogle other = (com.heroiclabs.nakama.api.AccountGoogle) arg1;
|
||||
token_ = visitor.visitString(!token_.isEmpty(), token_,
|
||||
!other.token_.isEmpty(), other.token_);
|
||||
vars_ = visitor.visitMap(
|
||||
vars_, other.internalGetVars());
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
token_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
VarsDefaultEntryHolder.defaultEntry.parseInto(vars_, input, extensionRegistry); 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.AccountGoogle.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AccountGoogle)
|
||||
private static final com.heroiclabs.nakama.api.AccountGoogle DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AccountGoogle();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountGoogle getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AccountGoogle> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AccountGoogle> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountGoogleOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AccountGoogle)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
java.lang.String getToken();
|
||||
/**
|
||||
* <pre>
|
||||
* The OAuth token received from Google to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTokenBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
int getVarsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
boolean containsVars(
|
||||
java.lang.String key);
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVars();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVarsMap();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue);
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrThrow(
|
||||
java.lang.String key);
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.Account)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
boolean hasUser();
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.User getUser();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The user's wallet data.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string wallet = 2;</code>
|
||||
*/
|
||||
java.lang.String getWallet();
|
||||
/**
|
||||
* <pre>
|
||||
* The user's wallet data.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string wallet = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getWalletBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The email address of the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 3;</code>
|
||||
*/
|
||||
java.lang.String getEmail();
|
||||
/**
|
||||
* <pre>
|
||||
* The email address of the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string email = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getEmailBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The devices which belong to the user's account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.AccountDevice devices = 4;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.AccountDevice>
|
||||
getDevicesList();
|
||||
/**
|
||||
* <pre>
|
||||
* The devices which belong to the user's account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.AccountDevice devices = 4;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountDevice getDevices(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The devices which belong to the user's account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.AccountDevice devices = 4;</code>
|
||||
*/
|
||||
int getDevicesCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The custom id in the user's account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string custom_id = 5;</code>
|
||||
*/
|
||||
java.lang.String getCustomId();
|
||||
/**
|
||||
* <pre>
|
||||
* The custom id in the user's account.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string custom_id = 5;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCustomIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the user's email was verified.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp verify_time = 6;</code>
|
||||
*/
|
||||
boolean hasVerifyTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the user's email was verified.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp verify_time = 6;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getVerifyTime();
|
||||
}
|
||||
+599
@@ -0,0 +1,599 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a Steam token to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountSteam}
|
||||
*/
|
||||
public final class AccountSteam extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AccountSteam, AccountSteam.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AccountSteam)
|
||||
AccountSteamOrBuilder {
|
||||
private AccountSteam() {
|
||||
token_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int TOKEN_FIELD_NUMBER = 1;
|
||||
private java.lang.String token_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public java.lang.String getToken() {
|
||||
return token_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTokenBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(token_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void setToken(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
token_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void clearToken() {
|
||||
|
||||
token_ = getDefaultInstance().getToken();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
private void setTokenBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
token_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int VARS_FIELD_NUMBER = 2;
|
||||
private static final class VarsDefaultEntryHolder {
|
||||
static final com.google.protobuf.MapEntryLite<
|
||||
java.lang.String, java.lang.String> defaultEntry =
|
||||
com.google.protobuf.MapEntryLite
|
||||
.<java.lang.String, java.lang.String>newDefaultInstance(
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"",
|
||||
com.google.protobuf.WireFormat.FieldType.STRING,
|
||||
"");
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<
|
||||
java.lang.String, java.lang.String> vars_ =
|
||||
com.google.protobuf.MapFieldLite.emptyMapField();
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetVars() {
|
||||
return vars_;
|
||||
}
|
||||
private com.google.protobuf.MapFieldLite<java.lang.String, java.lang.String>
|
||||
internalGetMutableVars() {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
return vars_;
|
||||
}
|
||||
|
||||
public int getVarsCount() {
|
||||
return internalGetVars().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return internalGetVars().containsKey(key);
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
internalGetVars());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
internalGetVars();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
private java.util.Map<java.lang.String, java.lang.String>
|
||||
getMutableVarsMap() {
|
||||
return internalGetMutableVars();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!token_.isEmpty()) {
|
||||
output.writeString(1, getToken());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
VarsDefaultEntryHolder.defaultEntry.serializeTo(
|
||||
output, 2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!token_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getToken());
|
||||
}
|
||||
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
|
||||
: internalGetVars().entrySet()) {
|
||||
size += VarsDefaultEntryHolder.defaultEntry.computeMessageSize(
|
||||
2, entry.getKey(), entry.getValue());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountSteam 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.AccountSteam 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.AccountSteam parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountSteam 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.AccountSteam parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountSteam 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.AccountSteam parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AccountSteam 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.AccountSteam 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.AccountSteam 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.AccountSteam prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Send a Steam token to the server. Used with authenticate/link/unlink.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AccountSteam}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AccountSteam, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AccountSteam)
|
||||
com.heroiclabs.nakama.api.AccountSteamOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AccountSteam.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public java.lang.String getToken() {
|
||||
return instance.getToken();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getTokenBytes() {
|
||||
return instance.getTokenBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder setToken(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setToken(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder clearToken() {
|
||||
copyOnWrite();
|
||||
instance.clearToken();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
public Builder setTokenBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setTokenBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public int getVarsCount() {
|
||||
return instance.getVarsMap().size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public boolean containsVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
return instance.getVarsMap().containsKey(key);
|
||||
}
|
||||
|
||||
public Builder clearVars() {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().clear();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public Builder removeVars(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().remove(key);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVars() {
|
||||
return getVarsMap();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
|
||||
return java.util.Collections.unmodifiableMap(
|
||||
instance.getVarsMap());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
public java.lang.String getVarsOrThrow(
|
||||
java.lang.String key) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
java.util.Map<java.lang.String, java.lang.String> map =
|
||||
instance.getVarsMap();
|
||||
if (!map.containsKey(key)) {
|
||||
throw new java.lang.IllegalArgumentException();
|
||||
}
|
||||
return map.get(key);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putVars(
|
||||
java.lang.String key,
|
||||
java.lang.String value) {
|
||||
if (key == null) { throw new java.lang.NullPointerException(); }
|
||||
if (value == null) { throw new java.lang.NullPointerException(); }
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().put(key, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
public Builder putAllVars(
|
||||
java.util.Map<java.lang.String, java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.getMutableVarsMap().putAll(values);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AccountSteam)
|
||||
}
|
||||
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.AccountSteam();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
vars_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AccountSteam other = (com.heroiclabs.nakama.api.AccountSteam) arg1;
|
||||
token_ = visitor.visitString(!token_.isEmpty(), token_,
|
||||
!other.token_.isEmpty(), other.token_);
|
||||
vars_ = visitor.visitMap(
|
||||
vars_, other.internalGetVars());
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
token_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
if (!vars_.isMutable()) {
|
||||
vars_ = vars_.mutableCopy();
|
||||
}
|
||||
VarsDefaultEntryHolder.defaultEntry.parseInto(vars_, input, extensionRegistry); 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.AccountSteam.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AccountSteam)
|
||||
private static final com.heroiclabs.nakama.api.AccountSteam DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AccountSteam();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AccountSteam getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AccountSteam> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AccountSteam> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AccountSteamOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AccountSteam)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
java.lang.String getToken();
|
||||
/**
|
||||
* <pre>
|
||||
* The account token received from Steam to access their profile API.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string token = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getTokenBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
int getVarsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
boolean containsVars(
|
||||
java.lang.String key);
|
||||
/**
|
||||
* Use {@link #getVarsMap()} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVars();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
java.util.Map<java.lang.String, java.lang.String>
|
||||
getVarsMap();
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrDefault(
|
||||
java.lang.String key,
|
||||
java.lang.String defaultValue);
|
||||
/**
|
||||
* <pre>
|
||||
* Extra information that will be bundled in the session token.
|
||||
* </pre>
|
||||
*
|
||||
* <code>map<string, string> vars = 2;</code>
|
||||
*/
|
||||
|
||||
java.lang.String getVarsOrThrow(
|
||||
java.lang.String key);
|
||||
}
|
||||
+713
@@ -0,0 +1,713 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Add one or more friends to the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AddFriendsRequest}
|
||||
*/
|
||||
public final class AddFriendsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AddFriendsRequest, AddFriendsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AddFriendsRequest)
|
||||
AddFriendsRequestOrBuilder {
|
||||
private AddFriendsRequest() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
public static final int IDS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> ids_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String> getIdsList() {
|
||||
return ids_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return ids_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return ids_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
ids_.get(index));
|
||||
}
|
||||
private void ensureIdsIsMutable() {
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void setIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, ids_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void clearIds() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public static final int USERNAMES_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> usernames_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String> getUsernamesList() {
|
||||
return usernames_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return usernames_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return usernames_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
usernames_.get(index));
|
||||
}
|
||||
private void ensureUsernamesIsMutable() {
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernames(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureUsernamesIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, usernames_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void clearUsernames() {
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
output.writeString(1, ids_.get(i));
|
||||
}
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
output.writeString(2, usernames_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(ids_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getIdsList().size();
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(usernames_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getUsernamesList().size();
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AddFriendsRequest 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.AddFriendsRequest 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.AddFriendsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AddFriendsRequest 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.AddFriendsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AddFriendsRequest 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.AddFriendsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AddFriendsRequest 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.AddFriendsRequest 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.AddFriendsRequest 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.AddFriendsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Add one or more friends to the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AddFriendsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AddFriendsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AddFriendsRequest)
|
||||
com.heroiclabs.nakama.api.AddFriendsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AddFriendsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return instance.getIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return instance.getIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return instance.getIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder setIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder clearIds() {
|
||||
copyOnWrite();
|
||||
instance.clearIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getUsernamesList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getUsernamesList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return instance.getUsernamesCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return instance.getUsernames(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return instance.getUsernamesBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernames(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernames(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernames(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllUsernames(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder clearUsernames() {
|
||||
copyOnWrite();
|
||||
instance.clearUsernames();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernamesBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AddFriendsRequest)
|
||||
}
|
||||
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.AddFriendsRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
ids_.makeImmutable();
|
||||
usernames_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AddFriendsRequest other = (com.heroiclabs.nakama.api.AddFriendsRequest) arg1;
|
||||
ids_= visitor.visitList(ids_, other.ids_);
|
||||
usernames_= visitor.visitList(usernames_, other.usernames_);
|
||||
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();
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
ids_.add(s);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
usernames_.add(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.AddFriendsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AddFriendsRequest)
|
||||
private static final com.heroiclabs.nakama.api.AddFriendsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AddFriendsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AddFriendsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AddFriendsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AddFriendsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AddFriendsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AddFriendsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
int getIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.lang.String getIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdsBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getUsernamesList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
int getUsernamesCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.lang.String getUsernames(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index);
|
||||
}
|
||||
+605
@@ -0,0 +1,605 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Add users to a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AddGroupUsersRequest}
|
||||
*/
|
||||
public final class AddGroupUsersRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AddGroupUsersRequest, AddGroupUsersRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AddGroupUsersRequest)
|
||||
AddGroupUsersRequestOrBuilder {
|
||||
private AddGroupUsersRequest() {
|
||||
groupId_ = "";
|
||||
userIds_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int GROUP_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String groupId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return groupId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(groupId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
groupId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void clearGroupId() {
|
||||
|
||||
groupId_ = getDefaultInstance().getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
groupId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int USER_IDS_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> userIds_;
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.util.List<String> getUserIdsList() {
|
||||
return userIds_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public int getUserIdsCount() {
|
||||
return userIds_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUserIds(int index) {
|
||||
return userIds_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUserIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
userIds_.get(index));
|
||||
}
|
||||
private void ensureUserIdsIsMutable() {
|
||||
if (!userIds_.isModifiable()) {
|
||||
userIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(userIds_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void setUserIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUserIdsIsMutable();
|
||||
userIds_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void addUserIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUserIdsIsMutable();
|
||||
userIds_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void addAllUserIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureUserIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, userIds_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void clearUserIds() {
|
||||
userIds_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void addUserIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureUserIdsIsMutable();
|
||||
userIds_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!groupId_.isEmpty()) {
|
||||
output.writeString(1, getGroupId());
|
||||
}
|
||||
for (int i = 0; i < userIds_.size(); i++) {
|
||||
output.writeString(2, userIds_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!groupId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getGroupId());
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < userIds_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(userIds_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getUserIdsList().size();
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AddGroupUsersRequest 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.AddGroupUsersRequest 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.AddGroupUsersRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AddGroupUsersRequest 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.AddGroupUsersRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AddGroupUsersRequest 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.AddGroupUsersRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AddGroupUsersRequest 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.AddGroupUsersRequest 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.AddGroupUsersRequest 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.AddGroupUsersRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Add users to a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AddGroupUsersRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AddGroupUsersRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AddGroupUsersRequest)
|
||||
com.heroiclabs.nakama.api.AddGroupUsersRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AddGroupUsersRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return instance.getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return instance.getGroupIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder clearGroupId() {
|
||||
copyOnWrite();
|
||||
instance.clearGroupId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getUserIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getUserIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public int getUserIdsCount() {
|
||||
return instance.getUserIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUserIds(int index) {
|
||||
return instance.getUserIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUserIdsBytes(int index) {
|
||||
return instance.getUserIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder setUserIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUserIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder addUserIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addUserIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder addAllUserIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllUserIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder clearUserIds() {
|
||||
copyOnWrite();
|
||||
instance.clearUserIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder addUserIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addUserIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AddGroupUsersRequest)
|
||||
}
|
||||
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.AddGroupUsersRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
userIds_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.AddGroupUsersRequest other = (com.heroiclabs.nakama.api.AddGroupUsersRequest) arg1;
|
||||
groupId_ = visitor.visitString(!groupId_.isEmpty(), groupId_,
|
||||
!other.groupId_.isEmpty(), other.groupId_);
|
||||
userIds_= visitor.visitList(userIds_, other.userIds_);
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
groupId_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
if (!userIds_.isModifiable()) {
|
||||
userIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(userIds_);
|
||||
}
|
||||
userIds_.add(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.AddGroupUsersRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AddGroupUsersRequest)
|
||||
private static final com.heroiclabs.nakama.api.AddGroupUsersRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AddGroupUsersRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AddGroupUsersRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AddGroupUsersRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AddGroupUsersRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AddGroupUsersRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AddGroupUsersRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getGroupId();
|
||||
/**
|
||||
* <pre>
|
||||
* The group to add users to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getGroupIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getUserIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
int getUserIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
java.lang.String getUserIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The users to add.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUserIdsBytes(int index);
|
||||
}
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with a custom ID.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateCustomRequest}
|
||||
*/
|
||||
public final class AuthenticateCustomRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AuthenticateCustomRequest, AuthenticateCustomRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AuthenticateCustomRequest)
|
||||
AuthenticateCustomRequestOrBuilder {
|
||||
private AuthenticateCustomRequest() {
|
||||
username_ = "";
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountCustom account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountCustom getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountCustom value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountCustom.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountCustom value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountCustom.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue create_;
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return create_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
create_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
create_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
if (create_ != null &&
|
||||
create_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
create_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(create_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
create_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void clearCreate() { create_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int USERNAME_FIELD_NUMBER = 3;
|
||||
private java.lang.String username_;
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return username_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(username_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsername(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
username_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void clearUsername() {
|
||||
|
||||
username_ = getDefaultInstance().getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
username_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
output.writeMessage(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
output.writeString(3, getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getUsername());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateCustomRequest 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.AuthenticateCustomRequest 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.AuthenticateCustomRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateCustomRequest 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.AuthenticateCustomRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateCustomRequest 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.AuthenticateCustomRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateCustomRequest 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.AuthenticateCustomRequest 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.AuthenticateCustomRequest 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.AuthenticateCustomRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with a custom ID.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateCustomRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AuthenticateCustomRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateCustomRequest)
|
||||
com.heroiclabs.nakama.api.AuthenticateCustomRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AuthenticateCustomRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountCustom getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountCustom value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountCustom.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountCustom value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return instance.hasCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return instance.getCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder clearCreate() { copyOnWrite();
|
||||
instance.clearCreate();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return instance.getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return instance.getUsernameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsername(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsername(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder clearUsername() {
|
||||
copyOnWrite();
|
||||
instance.clearUsername();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateCustomRequest)
|
||||
}
|
||||
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.AuthenticateCustomRequest();
|
||||
}
|
||||
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.AuthenticateCustomRequest other = (com.heroiclabs.nakama.api.AuthenticateCustomRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
create_ = visitor.visitMessage(create_, other.create_);
|
||||
username_ = visitor.visitString(!username_.isEmpty(), username_,
|
||||
!other.username_.isEmpty(), other.username_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountCustom.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountCustom.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (create_ != null) {
|
||||
subBuilder = create_.toBuilder();
|
||||
}
|
||||
create_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(create_);
|
||||
create_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = 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.AuthenticateCustomRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AuthenticateCustomRequest)
|
||||
private static final com.heroiclabs.nakama.api.AuthenticateCustomRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AuthenticateCustomRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateCustomRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AuthenticateCustomRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AuthenticateCustomRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AuthenticateCustomRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateCustomRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The custom account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountCustom account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountCustom getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
boolean hasCreate();
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getCreate();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
}
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with a device ID.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateDeviceRequest}
|
||||
*/
|
||||
public final class AuthenticateDeviceRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AuthenticateDeviceRequest, AuthenticateDeviceRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AuthenticateDeviceRequest)
|
||||
AuthenticateDeviceRequestOrBuilder {
|
||||
private AuthenticateDeviceRequest() {
|
||||
username_ = "";
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountDevice account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountDevice getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountDevice value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountDevice.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountDevice value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountDevice.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue create_;
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return create_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
create_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
create_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
if (create_ != null &&
|
||||
create_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
create_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(create_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
create_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void clearCreate() { create_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int USERNAME_FIELD_NUMBER = 3;
|
||||
private java.lang.String username_;
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return username_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(username_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsername(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
username_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void clearUsername() {
|
||||
|
||||
username_ = getDefaultInstance().getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
username_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
output.writeMessage(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
output.writeString(3, getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getUsername());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest 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.AuthenticateDeviceRequest 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.AuthenticateDeviceRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest 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.AuthenticateDeviceRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest 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.AuthenticateDeviceRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest 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.AuthenticateDeviceRequest 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.AuthenticateDeviceRequest 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.AuthenticateDeviceRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with a device ID.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateDeviceRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AuthenticateDeviceRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateDeviceRequest)
|
||||
com.heroiclabs.nakama.api.AuthenticateDeviceRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AuthenticateDeviceRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountDevice getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountDevice value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountDevice.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountDevice value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return instance.hasCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return instance.getCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder clearCreate() { copyOnWrite();
|
||||
instance.clearCreate();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return instance.getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return instance.getUsernameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsername(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsername(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder clearUsername() {
|
||||
copyOnWrite();
|
||||
instance.clearUsername();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateDeviceRequest)
|
||||
}
|
||||
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.AuthenticateDeviceRequest();
|
||||
}
|
||||
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.AuthenticateDeviceRequest other = (com.heroiclabs.nakama.api.AuthenticateDeviceRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
create_ = visitor.visitMessage(create_, other.create_);
|
||||
username_ = visitor.visitString(!username_.isEmpty(), username_,
|
||||
!other.username_.isEmpty(), other.username_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountDevice.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountDevice.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (create_ != null) {
|
||||
subBuilder = create_.toBuilder();
|
||||
}
|
||||
create_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(create_);
|
||||
create_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = 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.AuthenticateDeviceRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AuthenticateDeviceRequest)
|
||||
private static final com.heroiclabs.nakama.api.AuthenticateDeviceRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AuthenticateDeviceRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AuthenticateDeviceRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AuthenticateDeviceRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AuthenticateDeviceRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateDeviceRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The device account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountDevice account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountDevice getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
boolean hasCreate();
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getCreate();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
}
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with email+password.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateEmailRequest}
|
||||
*/
|
||||
public final class AuthenticateEmailRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AuthenticateEmailRequest, AuthenticateEmailRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AuthenticateEmailRequest)
|
||||
AuthenticateEmailRequestOrBuilder {
|
||||
private AuthenticateEmailRequest() {
|
||||
username_ = "";
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountEmail account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountEmail getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountEmail value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountEmail.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountEmail value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountEmail.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue create_;
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return create_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
create_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
create_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
if (create_ != null &&
|
||||
create_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
create_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(create_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
create_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void clearCreate() { create_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int USERNAME_FIELD_NUMBER = 3;
|
||||
private java.lang.String username_;
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return username_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(username_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsername(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
username_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void clearUsername() {
|
||||
|
||||
username_ = getDefaultInstance().getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
username_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
output.writeMessage(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
output.writeString(3, getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getUsername());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateEmailRequest 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.AuthenticateEmailRequest 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.AuthenticateEmailRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateEmailRequest 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.AuthenticateEmailRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateEmailRequest 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.AuthenticateEmailRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateEmailRequest 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.AuthenticateEmailRequest 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.AuthenticateEmailRequest 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.AuthenticateEmailRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with email+password.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateEmailRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AuthenticateEmailRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateEmailRequest)
|
||||
com.heroiclabs.nakama.api.AuthenticateEmailRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AuthenticateEmailRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountEmail getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountEmail value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountEmail.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountEmail value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return instance.hasCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return instance.getCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder clearCreate() { copyOnWrite();
|
||||
instance.clearCreate();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return instance.getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return instance.getUsernameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsername(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsername(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder clearUsername() {
|
||||
copyOnWrite();
|
||||
instance.clearUsername();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateEmailRequest)
|
||||
}
|
||||
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.AuthenticateEmailRequest();
|
||||
}
|
||||
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.AuthenticateEmailRequest other = (com.heroiclabs.nakama.api.AuthenticateEmailRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
create_ = visitor.visitMessage(create_, other.create_);
|
||||
username_ = visitor.visitString(!username_.isEmpty(), username_,
|
||||
!other.username_.isEmpty(), other.username_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountEmail.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountEmail.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (create_ != null) {
|
||||
subBuilder = create_.toBuilder();
|
||||
}
|
||||
create_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(create_);
|
||||
create_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = 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.AuthenticateEmailRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AuthenticateEmailRequest)
|
||||
private static final com.heroiclabs.nakama.api.AuthenticateEmailRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AuthenticateEmailRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateEmailRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AuthenticateEmailRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AuthenticateEmailRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AuthenticateEmailRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateEmailRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The email account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountEmail account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountEmail getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
boolean hasCreate();
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getCreate();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
}
|
||||
+849
@@ -0,0 +1,849 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Facebook.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateFacebookRequest}
|
||||
*/
|
||||
public final class AuthenticateFacebookRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AuthenticateFacebookRequest, AuthenticateFacebookRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AuthenticateFacebookRequest)
|
||||
AuthenticateFacebookRequestOrBuilder {
|
||||
private AuthenticateFacebookRequest() {
|
||||
username_ = "";
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountFacebook account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountFacebook getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountFacebook.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue create_;
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return create_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
create_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
create_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
if (create_ != null &&
|
||||
create_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
create_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(create_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
create_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void clearCreate() { create_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int USERNAME_FIELD_NUMBER = 3;
|
||||
private java.lang.String username_;
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return username_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(username_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsername(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
username_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void clearUsername() {
|
||||
|
||||
username_ = getDefaultInstance().getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
username_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int SYNC_FIELD_NUMBER = 4;
|
||||
private com.google.protobuf.BoolValue sync_;
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public boolean hasSync() {
|
||||
return sync_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getSync() {
|
||||
return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void setSync(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
sync_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void setSync(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
sync_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void mergeSync(com.google.protobuf.BoolValue value) {
|
||||
if (sync_ != null &&
|
||||
sync_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
sync_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(sync_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
sync_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void clearSync() { sync_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
output.writeMessage(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
output.writeString(3, getUsername());
|
||||
}
|
||||
if (sync_ != null) {
|
||||
output.writeMessage(4, getSync());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getUsername());
|
||||
}
|
||||
if (sync_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(4, getSync());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest 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.AuthenticateFacebookRequest 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.AuthenticateFacebookRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest 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.AuthenticateFacebookRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest 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.AuthenticateFacebookRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest 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.AuthenticateFacebookRequest 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.AuthenticateFacebookRequest 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.AuthenticateFacebookRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Facebook.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateFacebookRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AuthenticateFacebookRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateFacebookRequest)
|
||||
com.heroiclabs.nakama.api.AuthenticateFacebookRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AuthenticateFacebookRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountFacebook getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return instance.hasCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return instance.getCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder clearCreate() { copyOnWrite();
|
||||
instance.clearCreate();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return instance.getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return instance.getUsernameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsername(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsername(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder clearUsername() {
|
||||
copyOnWrite();
|
||||
instance.clearUsername();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public boolean hasSync() {
|
||||
return instance.hasSync();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getSync() {
|
||||
return instance.getSync();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder setSync(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setSync(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder setSync(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setSync(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder mergeSync(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeSync(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder clearSync() { copyOnWrite();
|
||||
instance.clearSync();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateFacebookRequest)
|
||||
}
|
||||
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.AuthenticateFacebookRequest();
|
||||
}
|
||||
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.AuthenticateFacebookRequest other = (com.heroiclabs.nakama.api.AuthenticateFacebookRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
create_ = visitor.visitMessage(create_, other.create_);
|
||||
username_ = visitor.visitString(!username_.isEmpty(), username_,
|
||||
!other.username_.isEmpty(), other.username_);
|
||||
sync_ = visitor.visitMessage(sync_, other.sync_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountFacebook.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (create_ != null) {
|
||||
subBuilder = create_.toBuilder();
|
||||
}
|
||||
create_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(create_);
|
||||
create_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = s;
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (sync_ != null) {
|
||||
subBuilder = sync_.toBuilder();
|
||||
}
|
||||
sync_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(sync_);
|
||||
sync_ = 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.AuthenticateFacebookRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AuthenticateFacebookRequest)
|
||||
private static final com.heroiclabs.nakama.api.AuthenticateFacebookRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AuthenticateFacebookRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AuthenticateFacebookRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AuthenticateFacebookRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AuthenticateFacebookRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateFacebookRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountFacebook getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
boolean hasCreate();
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getCreate();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
boolean hasSync();
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getSync();
|
||||
}
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Apple's Game Center.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateGameCenterRequest}
|
||||
*/
|
||||
public final class AuthenticateGameCenterRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AuthenticateGameCenterRequest, AuthenticateGameCenterRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AuthenticateGameCenterRequest)
|
||||
AuthenticateGameCenterRequestOrBuilder {
|
||||
private AuthenticateGameCenterRequest() {
|
||||
username_ = "";
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountGameCenter account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountGameCenter getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountGameCenter value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountGameCenter.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountGameCenter value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountGameCenter.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue create_;
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return create_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
create_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
create_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
if (create_ != null &&
|
||||
create_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
create_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(create_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
create_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void clearCreate() { create_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int USERNAME_FIELD_NUMBER = 3;
|
||||
private java.lang.String username_;
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return username_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(username_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsername(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
username_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void clearUsername() {
|
||||
|
||||
username_ = getDefaultInstance().getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
username_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
output.writeMessage(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
output.writeString(3, getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getUsername());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest 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.AuthenticateGameCenterRequest 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.AuthenticateGameCenterRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest 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.AuthenticateGameCenterRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest 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.AuthenticateGameCenterRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest 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.AuthenticateGameCenterRequest 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.AuthenticateGameCenterRequest 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.AuthenticateGameCenterRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Apple's Game Center.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateGameCenterRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AuthenticateGameCenterRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateGameCenterRequest)
|
||||
com.heroiclabs.nakama.api.AuthenticateGameCenterRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountGameCenter getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountGameCenter value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountGameCenter.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountGameCenter value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return instance.hasCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return instance.getCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder clearCreate() { copyOnWrite();
|
||||
instance.clearCreate();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return instance.getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return instance.getUsernameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsername(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsername(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder clearUsername() {
|
||||
copyOnWrite();
|
||||
instance.clearUsername();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateGameCenterRequest)
|
||||
}
|
||||
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.AuthenticateGameCenterRequest();
|
||||
}
|
||||
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.AuthenticateGameCenterRequest other = (com.heroiclabs.nakama.api.AuthenticateGameCenterRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
create_ = visitor.visitMessage(create_, other.create_);
|
||||
username_ = visitor.visitString(!username_.isEmpty(), username_,
|
||||
!other.username_.isEmpty(), other.username_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountGameCenter.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountGameCenter.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (create_ != null) {
|
||||
subBuilder = create_.toBuilder();
|
||||
}
|
||||
create_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(create_);
|
||||
create_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = 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.AuthenticateGameCenterRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AuthenticateGameCenterRequest)
|
||||
private static final com.heroiclabs.nakama.api.AuthenticateGameCenterRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AuthenticateGameCenterRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AuthenticateGameCenterRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AuthenticateGameCenterRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AuthenticateGameCenterRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateGameCenterRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The Game Center account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGameCenter account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountGameCenter getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
boolean hasCreate();
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getCreate();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
}
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Google.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateGoogleRequest}
|
||||
*/
|
||||
public final class AuthenticateGoogleRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AuthenticateGoogleRequest, AuthenticateGoogleRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AuthenticateGoogleRequest)
|
||||
AuthenticateGoogleRequestOrBuilder {
|
||||
private AuthenticateGoogleRequest() {
|
||||
username_ = "";
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountGoogle account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountGoogle getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountGoogle value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountGoogle.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountGoogle value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountGoogle.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue create_;
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return create_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
create_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
create_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
if (create_ != null &&
|
||||
create_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
create_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(create_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
create_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void clearCreate() { create_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int USERNAME_FIELD_NUMBER = 3;
|
||||
private java.lang.String username_;
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return username_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(username_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsername(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
username_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void clearUsername() {
|
||||
|
||||
username_ = getDefaultInstance().getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
username_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
output.writeMessage(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
output.writeString(3, getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getUsername());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest 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.AuthenticateGoogleRequest 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.AuthenticateGoogleRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest 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.AuthenticateGoogleRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest 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.AuthenticateGoogleRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest 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.AuthenticateGoogleRequest 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.AuthenticateGoogleRequest 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.AuthenticateGoogleRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Google.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateGoogleRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AuthenticateGoogleRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateGoogleRequest)
|
||||
com.heroiclabs.nakama.api.AuthenticateGoogleRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AuthenticateGoogleRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountGoogle getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountGoogle value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountGoogle.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountGoogle value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return instance.hasCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return instance.getCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder clearCreate() { copyOnWrite();
|
||||
instance.clearCreate();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return instance.getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return instance.getUsernameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsername(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsername(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder clearUsername() {
|
||||
copyOnWrite();
|
||||
instance.clearUsername();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateGoogleRequest)
|
||||
}
|
||||
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.AuthenticateGoogleRequest();
|
||||
}
|
||||
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.AuthenticateGoogleRequest other = (com.heroiclabs.nakama.api.AuthenticateGoogleRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
create_ = visitor.visitMessage(create_, other.create_);
|
||||
username_ = visitor.visitString(!username_.isEmpty(), username_,
|
||||
!other.username_.isEmpty(), other.username_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountGoogle.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountGoogle.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (create_ != null) {
|
||||
subBuilder = create_.toBuilder();
|
||||
}
|
||||
create_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(create_);
|
||||
create_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = 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.AuthenticateGoogleRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AuthenticateGoogleRequest)
|
||||
private static final com.heroiclabs.nakama.api.AuthenticateGoogleRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AuthenticateGoogleRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AuthenticateGoogleRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AuthenticateGoogleRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AuthenticateGoogleRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateGoogleRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The Google account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountGoogle account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountGoogle getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
boolean hasCreate();
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getCreate();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
}
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Steam.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateSteamRequest}
|
||||
*/
|
||||
public final class AuthenticateSteamRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
AuthenticateSteamRequest, AuthenticateSteamRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.AuthenticateSteamRequest)
|
||||
AuthenticateSteamRequestOrBuilder {
|
||||
private AuthenticateSteamRequest() {
|
||||
username_ = "";
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountSteam account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountSteam getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountSteam value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountSteam.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountSteam value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountSteam.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CREATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue create_;
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return create_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
create_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
create_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
if (create_ != null &&
|
||||
create_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
create_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(create_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
create_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
private void clearCreate() { create_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int USERNAME_FIELD_NUMBER = 3;
|
||||
private java.lang.String username_;
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return username_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(username_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsername(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
username_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void clearUsername() {
|
||||
|
||||
username_ = getDefaultInstance().getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
private void setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
username_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
output.writeMessage(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
output.writeString(3, getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (create_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getCreate());
|
||||
}
|
||||
if (!username_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getUsername());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateSteamRequest 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.AuthenticateSteamRequest 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.AuthenticateSteamRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateSteamRequest 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.AuthenticateSteamRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateSteamRequest 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.AuthenticateSteamRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.AuthenticateSteamRequest 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.AuthenticateSteamRequest 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.AuthenticateSteamRequest 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.AuthenticateSteamRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authenticate against the server with Steam.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.AuthenticateSteamRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.AuthenticateSteamRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateSteamRequest)
|
||||
com.heroiclabs.nakama.api.AuthenticateSteamRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.AuthenticateSteamRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountSteam getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountSteam value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountSteam.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountSteam value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public boolean hasCreate() {
|
||||
return instance.hasCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getCreate() {
|
||||
return instance.getCreate();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder setCreate(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setCreate(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder mergeCreate(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeCreate(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
public Builder clearCreate() { copyOnWrite();
|
||||
instance.clearCreate();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public java.lang.String getUsername() {
|
||||
return instance.getUsername();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernameBytes() {
|
||||
return instance.getUsernameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsername(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsername(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder clearUsername() {
|
||||
copyOnWrite();
|
||||
instance.clearUsername();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
public Builder setUsernameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateSteamRequest)
|
||||
}
|
||||
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.AuthenticateSteamRequest();
|
||||
}
|
||||
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.AuthenticateSteamRequest other = (com.heroiclabs.nakama.api.AuthenticateSteamRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
create_ = visitor.visitMessage(create_, other.create_);
|
||||
username_ = visitor.visitString(!username_.isEmpty(), username_,
|
||||
!other.username_.isEmpty(), other.username_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountSteam.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountSteam.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (create_ != null) {
|
||||
subBuilder = create_.toBuilder();
|
||||
}
|
||||
create_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(create_);
|
||||
create_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
username_ = 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.AuthenticateSteamRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.AuthenticateSteamRequest)
|
||||
private static final com.heroiclabs.nakama.api.AuthenticateSteamRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new AuthenticateSteamRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.AuthenticateSteamRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<AuthenticateSteamRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<AuthenticateSteamRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface AuthenticateSteamRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateSteamRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The Steam account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountSteam account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountSteam getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
boolean hasCreate();
|
||||
/**
|
||||
* <pre>
|
||||
* Register the account if the user does not already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue create = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getCreate();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* Set the username on the account at register. Must be unique.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
}
|
||||
+713
@@ -0,0 +1,713 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Block one or more friends for the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.BlockFriendsRequest}
|
||||
*/
|
||||
public final class BlockFriendsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
BlockFriendsRequest, BlockFriendsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.BlockFriendsRequest)
|
||||
BlockFriendsRequestOrBuilder {
|
||||
private BlockFriendsRequest() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
public static final int IDS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> ids_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String> getIdsList() {
|
||||
return ids_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return ids_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return ids_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
ids_.get(index));
|
||||
}
|
||||
private void ensureIdsIsMutable() {
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void setIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, ids_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void clearIds() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public static final int USERNAMES_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> usernames_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String> getUsernamesList() {
|
||||
return usernames_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return usernames_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return usernames_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
usernames_.get(index));
|
||||
}
|
||||
private void ensureUsernamesIsMutable() {
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernames(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureUsernamesIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, usernames_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void clearUsernames() {
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
output.writeString(1, ids_.get(i));
|
||||
}
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
output.writeString(2, usernames_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(ids_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getIdsList().size();
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(usernames_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getUsernamesList().size();
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.BlockFriendsRequest 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.BlockFriendsRequest 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.BlockFriendsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.BlockFriendsRequest 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.BlockFriendsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.BlockFriendsRequest 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.BlockFriendsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.BlockFriendsRequest 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.BlockFriendsRequest 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.BlockFriendsRequest 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.BlockFriendsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Block one or more friends for the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.BlockFriendsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.BlockFriendsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.BlockFriendsRequest)
|
||||
com.heroiclabs.nakama.api.BlockFriendsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.BlockFriendsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return instance.getIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return instance.getIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return instance.getIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder setIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder clearIds() {
|
||||
copyOnWrite();
|
||||
instance.clearIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getUsernamesList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getUsernamesList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return instance.getUsernamesCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return instance.getUsernames(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return instance.getUsernamesBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernames(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernames(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernames(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllUsernames(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder clearUsernames() {
|
||||
copyOnWrite();
|
||||
instance.clearUsernames();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernamesBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.BlockFriendsRequest)
|
||||
}
|
||||
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.BlockFriendsRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
ids_.makeImmutable();
|
||||
usernames_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.BlockFriendsRequest other = (com.heroiclabs.nakama.api.BlockFriendsRequest) arg1;
|
||||
ids_= visitor.visitList(ids_, other.ids_);
|
||||
usernames_= visitor.visitList(usernames_, other.usernames_);
|
||||
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();
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
ids_.add(s);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
usernames_.add(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.BlockFriendsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.BlockFriendsRequest)
|
||||
private static final com.heroiclabs.nakama.api.BlockFriendsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new BlockFriendsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.BlockFriendsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<BlockFriendsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<BlockFriendsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface BlockFriendsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.BlockFriendsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
int getIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.lang.String getIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdsBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getUsernamesList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
int getUsernamesCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.lang.String getUsernames(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index);
|
||||
}
|
||||
+2151
File diff suppressed because it is too large.
Load diff
+835
@@ -0,0 +1,835 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of channel messages, usually a result of a list operation.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ChannelMessageList}
|
||||
*/
|
||||
public final class ChannelMessageList extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ChannelMessageList, ChannelMessageList.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ChannelMessageList)
|
||||
ChannelMessageListOrBuilder {
|
||||
private ChannelMessageList() {
|
||||
messages_ = emptyProtobufList();
|
||||
nextCursor_ = "";
|
||||
prevCursor_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int MESSAGES_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<com.heroiclabs.nakama.api.ChannelMessage> messages_;
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.ChannelMessage> getMessagesList() {
|
||||
return messages_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public java.util.List<? extends com.heroiclabs.nakama.api.ChannelMessageOrBuilder>
|
||||
getMessagesOrBuilderList() {
|
||||
return messages_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public int getMessagesCount() {
|
||||
return messages_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.ChannelMessage getMessages(int index) {
|
||||
return messages_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.ChannelMessageOrBuilder getMessagesOrBuilder(
|
||||
int index) {
|
||||
return messages_.get(index);
|
||||
}
|
||||
private void ensureMessagesIsMutable() {
|
||||
if (!messages_.isModifiable()) {
|
||||
messages_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(messages_);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void setMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureMessagesIsMutable();
|
||||
messages_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void setMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) {
|
||||
ensureMessagesIsMutable();
|
||||
messages_.set(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void addMessages(com.heroiclabs.nakama.api.ChannelMessage value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureMessagesIsMutable();
|
||||
messages_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void addMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureMessagesIsMutable();
|
||||
messages_.add(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void addMessages(
|
||||
com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) {
|
||||
ensureMessagesIsMutable();
|
||||
messages_.add(builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void addMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) {
|
||||
ensureMessagesIsMutable();
|
||||
messages_.add(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void addAllMessages(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.ChannelMessage> values) {
|
||||
ensureMessagesIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, messages_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void clearMessages() {
|
||||
messages_ = emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
private void removeMessages(int index) {
|
||||
ensureMessagesIsMutable();
|
||||
messages_.remove(index);
|
||||
}
|
||||
|
||||
public static final int NEXT_CURSOR_FIELD_NUMBER = 2;
|
||||
private java.lang.String nextCursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getNextCursor() {
|
||||
return nextCursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNextCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(nextCursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
private void setNextCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
nextCursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
private void clearNextCursor() {
|
||||
|
||||
nextCursor_ = getDefaultInstance().getNextCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
private void setNextCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
nextCursor_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int PREV_CURSOR_FIELD_NUMBER = 3;
|
||||
private java.lang.String prevCursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
public java.lang.String getPrevCursor() {
|
||||
return prevCursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getPrevCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(prevCursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
private void setPrevCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
prevCursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
private void clearPrevCursor() {
|
||||
|
||||
prevCursor_ = getDefaultInstance().getPrevCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
private void setPrevCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
prevCursor_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < messages_.size(); i++) {
|
||||
output.writeMessage(1, messages_.get(i));
|
||||
}
|
||||
if (!nextCursor_.isEmpty()) {
|
||||
output.writeString(2, getNextCursor());
|
||||
}
|
||||
if (!prevCursor_.isEmpty()) {
|
||||
output.writeString(3, getPrevCursor());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
for (int i = 0; i < messages_.size(); i++) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, messages_.get(i));
|
||||
}
|
||||
if (!nextCursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getNextCursor());
|
||||
}
|
||||
if (!prevCursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getPrevCursor());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ChannelMessageList 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.ChannelMessageList 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.ChannelMessageList parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ChannelMessageList 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.ChannelMessageList parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ChannelMessageList 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.ChannelMessageList parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ChannelMessageList 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.ChannelMessageList 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.ChannelMessageList 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.ChannelMessageList prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of channel messages, usually a result of a list operation.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ChannelMessageList}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ChannelMessageList, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ChannelMessageList)
|
||||
com.heroiclabs.nakama.api.ChannelMessageListOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ChannelMessageList.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.ChannelMessage> getMessagesList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getMessagesList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public int getMessagesCount() {
|
||||
return instance.getMessagesCount();
|
||||
}/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.ChannelMessage getMessages(int index) {
|
||||
return instance.getMessages(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder setMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage value) {
|
||||
copyOnWrite();
|
||||
instance.setMessages(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder setMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setMessages(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder addMessages(com.heroiclabs.nakama.api.ChannelMessage value) {
|
||||
copyOnWrite();
|
||||
instance.addMessages(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder addMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage value) {
|
||||
copyOnWrite();
|
||||
instance.addMessages(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder addMessages(
|
||||
com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addMessages(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder addMessages(
|
||||
int index, com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addMessages(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder addAllMessages(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.ChannelMessage> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllMessages(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder clearMessages() {
|
||||
copyOnWrite();
|
||||
instance.clearMessages();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
public Builder removeMessages(int index) {
|
||||
copyOnWrite();
|
||||
instance.removeMessages(index);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getNextCursor() {
|
||||
return instance.getNextCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNextCursorBytes() {
|
||||
return instance.getNextCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
public Builder setNextCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setNextCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
public Builder clearNextCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearNextCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
public Builder setNextCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setNextCursorBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
public java.lang.String getPrevCursor() {
|
||||
return instance.getPrevCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getPrevCursorBytes() {
|
||||
return instance.getPrevCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
public Builder setPrevCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setPrevCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
public Builder clearPrevCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearPrevCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
public Builder setPrevCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setPrevCursorBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ChannelMessageList)
|
||||
}
|
||||
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.ChannelMessageList();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
messages_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.ChannelMessageList other = (com.heroiclabs.nakama.api.ChannelMessageList) arg1;
|
||||
messages_= visitor.visitList(messages_, other.messages_);
|
||||
nextCursor_ = visitor.visitString(!nextCursor_.isEmpty(), nextCursor_,
|
||||
!other.nextCursor_.isEmpty(), other.nextCursor_);
|
||||
prevCursor_ = visitor.visitString(!prevCursor_.isEmpty(), prevCursor_,
|
||||
!other.prevCursor_.isEmpty(), other.prevCursor_);
|
||||
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 (!messages_.isModifiable()) {
|
||||
messages_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(messages_);
|
||||
}
|
||||
messages_.add(
|
||||
input.readMessage(com.heroiclabs.nakama.api.ChannelMessage.parser(), extensionRegistry));
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
nextCursor_ = s;
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
prevCursor_ = 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.ChannelMessageList.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ChannelMessageList)
|
||||
private static final com.heroiclabs.nakama.api.ChannelMessageList DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ChannelMessageList();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ChannelMessageList getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ChannelMessageList> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ChannelMessageList> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ChannelMessageListOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ChannelMessageList)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.ChannelMessage>
|
||||
getMessagesList();
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.ChannelMessage getMessages(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* A list of messages.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.ChannelMessage messages = 1;</code>
|
||||
*/
|
||||
int getMessagesCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
java.lang.String getNextCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retireving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNextCursorBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
java.lang.String getPrevCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPrevCursorBytes();
|
||||
}
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ChannelMessageOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ChannelMessage)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The channel this message belongs to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getChannelId();
|
||||
/**
|
||||
* <pre>
|
||||
* The channel this message belongs to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getChannelIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The unique ID of this message.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string message_id = 2;</code>
|
||||
*/
|
||||
java.lang.String getMessageId();
|
||||
/**
|
||||
* <pre>
|
||||
* The unique ID of this message.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string message_id = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMessageIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The code representing a message type or category.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value code = 3;</code>
|
||||
*/
|
||||
boolean hasCode();
|
||||
/**
|
||||
* <pre>
|
||||
* The code representing a message type or category.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value code = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getCode();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Message sender, usually a user ID.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string sender_id = 4;</code>
|
||||
*/
|
||||
java.lang.String getSenderId();
|
||||
/**
|
||||
* <pre>
|
||||
* Message sender, usually a user ID.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string sender_id = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getSenderIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The username of the message sender, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 5;</code>
|
||||
*/
|
||||
java.lang.String getUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* The username of the message sender, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string username = 5;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernameBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The content payload.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string content = 6;</code>
|
||||
*/
|
||||
java.lang.String getContent();
|
||||
/**
|
||||
* <pre>
|
||||
* The content payload.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string content = 6;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getContentBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the message was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 7;</code>
|
||||
*/
|
||||
boolean hasCreateTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the message was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 7;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getCreateTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the message was last updated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp update_time = 8;</code>
|
||||
*/
|
||||
boolean hasUpdateTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the message was last updated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp update_time = 8;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getUpdateTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* True if the message was persisted to the channel's history, false otherwise.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue persistent = 9;</code>
|
||||
*/
|
||||
boolean hasPersistent();
|
||||
/**
|
||||
* <pre>
|
||||
* True if the message was persisted to the channel's history, false otherwise.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue persistent = 9;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getPersistent();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The name of the chat room, or an empty string if this message was not sent through a chat room.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string room_name = 10;</code>
|
||||
*/
|
||||
java.lang.String getRoomName();
|
||||
/**
|
||||
* <pre>
|
||||
* The name of the chat room, or an empty string if this message was not sent through a chat room.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string room_name = 10;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getRoomNameBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the group, or an empty string if this message was not sent through a group channel.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 11;</code>
|
||||
*/
|
||||
java.lang.String getGroupId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the group, or an empty string if this message was not sent through a group channel.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 11;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getGroupIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string user_id_one = 12;</code>
|
||||
*/
|
||||
java.lang.String getUserIdOne();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string user_id_one = 12;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUserIdOneBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string user_id_two = 13;</code>
|
||||
*/
|
||||
java.lang.String getUserIdTwo();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string user_id_two = 13;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUserIdTwoBytes();
|
||||
}
|
||||
+945
@@ -0,0 +1,945 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Create a group with the current user as owner.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.CreateGroupRequest}
|
||||
*/
|
||||
public final class CreateGroupRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
CreateGroupRequest, CreateGroupRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.CreateGroupRequest)
|
||||
CreateGroupRequestOrBuilder {
|
||||
private CreateGroupRequest() {
|
||||
name_ = "";
|
||||
description_ = "";
|
||||
langTag_ = "";
|
||||
avatarUrl_ = "";
|
||||
}
|
||||
public static final int NAME_FIELD_NUMBER = 1;
|
||||
private java.lang.String name_;
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
return name_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(name_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
private void setName(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
name_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
private void clearName() {
|
||||
|
||||
name_ = getDefaultInstance().getName();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
private void setNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
name_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int DESCRIPTION_FIELD_NUMBER = 2;
|
||||
private java.lang.String description_;
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
public java.lang.String getDescription() {
|
||||
return description_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getDescriptionBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(description_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
private void setDescription(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
description_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
private void clearDescription() {
|
||||
|
||||
description_ = getDefaultInstance().getDescription();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
private void setDescriptionBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
description_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int LANG_TAG_FIELD_NUMBER = 3;
|
||||
private java.lang.String langTag_;
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
public java.lang.String getLangTag() {
|
||||
return langTag_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getLangTagBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(langTag_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
private void setLangTag(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
langTag_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
private void clearLangTag() {
|
||||
|
||||
langTag_ = getDefaultInstance().getLangTag();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
private void setLangTagBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
langTag_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int AVATAR_URL_FIELD_NUMBER = 4;
|
||||
private java.lang.String avatarUrl_;
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
public java.lang.String getAvatarUrl() {
|
||||
return avatarUrl_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getAvatarUrlBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(avatarUrl_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
private void setAvatarUrl(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
avatarUrl_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
private void clearAvatarUrl() {
|
||||
|
||||
avatarUrl_ = getDefaultInstance().getAvatarUrl();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
private void setAvatarUrlBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
avatarUrl_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int OPEN_FIELD_NUMBER = 5;
|
||||
private boolean open_;
|
||||
/**
|
||||
* <pre>
|
||||
* Mark a group as open or not where only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool open = 5;</code>
|
||||
*/
|
||||
public boolean getOpen() {
|
||||
return open_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Mark a group as open or not where only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool open = 5;</code>
|
||||
*/
|
||||
private void setOpen(boolean value) {
|
||||
|
||||
open_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Mark a group as open or not where only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool open = 5;</code>
|
||||
*/
|
||||
private void clearOpen() {
|
||||
|
||||
open_ = false;
|
||||
}
|
||||
|
||||
public static final int MAX_COUNT_FIELD_NUMBER = 6;
|
||||
private int maxCount_;
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum number of group members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 6;</code>
|
||||
*/
|
||||
public int getMaxCount() {
|
||||
return maxCount_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum number of group members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 6;</code>
|
||||
*/
|
||||
private void setMaxCount(int value) {
|
||||
|
||||
maxCount_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum number of group members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 6;</code>
|
||||
*/
|
||||
private void clearMaxCount() {
|
||||
|
||||
maxCount_ = 0;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!name_.isEmpty()) {
|
||||
output.writeString(1, getName());
|
||||
}
|
||||
if (!description_.isEmpty()) {
|
||||
output.writeString(2, getDescription());
|
||||
}
|
||||
if (!langTag_.isEmpty()) {
|
||||
output.writeString(3, getLangTag());
|
||||
}
|
||||
if (!avatarUrl_.isEmpty()) {
|
||||
output.writeString(4, getAvatarUrl());
|
||||
}
|
||||
if (open_ != false) {
|
||||
output.writeBool(5, open_);
|
||||
}
|
||||
if (maxCount_ != 0) {
|
||||
output.writeInt32(6, maxCount_);
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!name_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getName());
|
||||
}
|
||||
if (!description_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getDescription());
|
||||
}
|
||||
if (!langTag_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getLangTag());
|
||||
}
|
||||
if (!avatarUrl_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(4, getAvatarUrl());
|
||||
}
|
||||
if (open_ != false) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeBoolSize(5, open_);
|
||||
}
|
||||
if (maxCount_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(6, maxCount_);
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.CreateGroupRequest 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.CreateGroupRequest 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.CreateGroupRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.CreateGroupRequest 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.CreateGroupRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.CreateGroupRequest 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.CreateGroupRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.CreateGroupRequest 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.CreateGroupRequest 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.CreateGroupRequest 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.CreateGroupRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Create a group with the current user as owner.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.CreateGroupRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.CreateGroupRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.CreateGroupRequest)
|
||||
com.heroiclabs.nakama.api.CreateGroupRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.CreateGroupRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
return instance.getName();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
return instance.getNameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder setName(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setName(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder clearName() {
|
||||
copyOnWrite();
|
||||
instance.clearName();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder setNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setNameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
public java.lang.String getDescription() {
|
||||
return instance.getDescription();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getDescriptionBytes() {
|
||||
return instance.getDescriptionBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
public Builder setDescription(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setDescription(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
public Builder clearDescription() {
|
||||
copyOnWrite();
|
||||
instance.clearDescription();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
public Builder setDescriptionBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setDescriptionBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
public java.lang.String getLangTag() {
|
||||
return instance.getLangTag();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getLangTagBytes() {
|
||||
return instance.getLangTagBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
public Builder setLangTag(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setLangTag(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
public Builder clearLangTag() {
|
||||
copyOnWrite();
|
||||
instance.clearLangTag();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
public Builder setLangTagBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setLangTagBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
public java.lang.String getAvatarUrl() {
|
||||
return instance.getAvatarUrl();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getAvatarUrlBytes() {
|
||||
return instance.getAvatarUrlBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
public Builder setAvatarUrl(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setAvatarUrl(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
public Builder clearAvatarUrl() {
|
||||
copyOnWrite();
|
||||
instance.clearAvatarUrl();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
public Builder setAvatarUrlBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setAvatarUrlBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Mark a group as open or not where only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool open = 5;</code>
|
||||
*/
|
||||
public boolean getOpen() {
|
||||
return instance.getOpen();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Mark a group as open or not where only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool open = 5;</code>
|
||||
*/
|
||||
public Builder setOpen(boolean value) {
|
||||
copyOnWrite();
|
||||
instance.setOpen(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Mark a group as open or not where only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool open = 5;</code>
|
||||
*/
|
||||
public Builder clearOpen() {
|
||||
copyOnWrite();
|
||||
instance.clearOpen();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum number of group members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 6;</code>
|
||||
*/
|
||||
public int getMaxCount() {
|
||||
return instance.getMaxCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum number of group members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 6;</code>
|
||||
*/
|
||||
public Builder setMaxCount(int value) {
|
||||
copyOnWrite();
|
||||
instance.setMaxCount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum number of group members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 6;</code>
|
||||
*/
|
||||
public Builder clearMaxCount() {
|
||||
copyOnWrite();
|
||||
instance.clearMaxCount();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.CreateGroupRequest)
|
||||
}
|
||||
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.CreateGroupRequest();
|
||||
}
|
||||
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.CreateGroupRequest other = (com.heroiclabs.nakama.api.CreateGroupRequest) arg1;
|
||||
name_ = visitor.visitString(!name_.isEmpty(), name_,
|
||||
!other.name_.isEmpty(), other.name_);
|
||||
description_ = visitor.visitString(!description_.isEmpty(), description_,
|
||||
!other.description_.isEmpty(), other.description_);
|
||||
langTag_ = visitor.visitString(!langTag_.isEmpty(), langTag_,
|
||||
!other.langTag_.isEmpty(), other.langTag_);
|
||||
avatarUrl_ = visitor.visitString(!avatarUrl_.isEmpty(), avatarUrl_,
|
||||
!other.avatarUrl_.isEmpty(), other.avatarUrl_);
|
||||
open_ = visitor.visitBoolean(open_ != false, open_,
|
||||
other.open_ != false, other.open_);
|
||||
maxCount_ = visitor.visitInt(maxCount_ != 0, maxCount_,
|
||||
other.maxCount_ != 0, other.maxCount_);
|
||||
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();
|
||||
|
||||
name_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
description_ = s;
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
langTag_ = s;
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
avatarUrl_ = s;
|
||||
break;
|
||||
}
|
||||
case 40: {
|
||||
|
||||
open_ = input.readBool();
|
||||
break;
|
||||
}
|
||||
case 48: {
|
||||
|
||||
maxCount_ = input.readInt32();
|
||||
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.CreateGroupRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.CreateGroupRequest)
|
||||
private static final com.heroiclabs.nakama.api.CreateGroupRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new CreateGroupRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.CreateGroupRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<CreateGroupRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<CreateGroupRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface CreateGroupRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.CreateGroupRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
java.lang.String getName();
|
||||
/**
|
||||
* <pre>
|
||||
* A unique name for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNameBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
java.lang.String getDescription();
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getDescriptionBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
java.lang.String getLangTag();
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getLangTagBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
java.lang.String getAvatarUrl();
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getAvatarUrlBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Mark a group as open or not where only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional bool open = 5;</code>
|
||||
*/
|
||||
boolean getOpen();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum number of group members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 6;</code>
|
||||
*/
|
||||
int getMaxCount();
|
||||
}
|
||||
+713
@@ -0,0 +1,713 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete one or more friends for the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteFriendsRequest}
|
||||
*/
|
||||
public final class DeleteFriendsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
DeleteFriendsRequest, DeleteFriendsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.DeleteFriendsRequest)
|
||||
DeleteFriendsRequestOrBuilder {
|
||||
private DeleteFriendsRequest() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
public static final int IDS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> ids_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String> getIdsList() {
|
||||
return ids_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return ids_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return ids_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
ids_.get(index));
|
||||
}
|
||||
private void ensureIdsIsMutable() {
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void setIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, ids_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void clearIds() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public static final int USERNAMES_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> usernames_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String> getUsernamesList() {
|
||||
return usernames_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return usernames_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return usernames_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
usernames_.get(index));
|
||||
}
|
||||
private void ensureUsernamesIsMutable() {
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernames(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureUsernamesIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, usernames_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void clearUsernames() {
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
output.writeString(1, ids_.get(i));
|
||||
}
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
output.writeString(2, usernames_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(ids_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getIdsList().size();
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(usernames_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getUsernamesList().size();
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteFriendsRequest 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.DeleteFriendsRequest 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.DeleteFriendsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteFriendsRequest 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.DeleteFriendsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteFriendsRequest 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.DeleteFriendsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteFriendsRequest 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.DeleteFriendsRequest 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.DeleteFriendsRequest 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.DeleteFriendsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete one or more friends for the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteFriendsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.DeleteFriendsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.DeleteFriendsRequest)
|
||||
com.heroiclabs.nakama.api.DeleteFriendsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.DeleteFriendsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return instance.getIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return instance.getIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return instance.getIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder setIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder clearIds() {
|
||||
copyOnWrite();
|
||||
instance.clearIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getUsernamesList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getUsernamesList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return instance.getUsernamesCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return instance.getUsernames(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return instance.getUsernamesBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernames(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernames(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernames(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllUsernames(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder clearUsernames() {
|
||||
copyOnWrite();
|
||||
instance.clearUsernames();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernamesBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.DeleteFriendsRequest)
|
||||
}
|
||||
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.DeleteFriendsRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
ids_.makeImmutable();
|
||||
usernames_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.DeleteFriendsRequest other = (com.heroiclabs.nakama.api.DeleteFriendsRequest) arg1;
|
||||
ids_= visitor.visitList(ids_, other.ids_);
|
||||
usernames_= visitor.visitList(usernames_, other.usernames_);
|
||||
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();
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
ids_.add(s);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
usernames_.add(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.DeleteFriendsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.DeleteFriendsRequest)
|
||||
private static final com.heroiclabs.nakama.api.DeleteFriendsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new DeleteFriendsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteFriendsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<DeleteFriendsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<DeleteFriendsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface DeleteFriendsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.DeleteFriendsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
int getIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.lang.String getIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdsBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getUsernamesList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
int getUsernamesCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.lang.String getUsernames(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index);
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete a group the user has access to.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteGroupRequest}
|
||||
*/
|
||||
public final class DeleteGroupRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
DeleteGroupRequest, DeleteGroupRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.DeleteGroupRequest)
|
||||
DeleteGroupRequestOrBuilder {
|
||||
private DeleteGroupRequest() {
|
||||
groupId_ = "";
|
||||
}
|
||||
public static final int GROUP_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String groupId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return groupId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(groupId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
groupId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void clearGroupId() {
|
||||
|
||||
groupId_ = getDefaultInstance().getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
groupId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!groupId_.isEmpty()) {
|
||||
output.writeString(1, getGroupId());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!groupId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getGroupId());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteGroupRequest 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.DeleteGroupRequest 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.DeleteGroupRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteGroupRequest 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.DeleteGroupRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteGroupRequest 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.DeleteGroupRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteGroupRequest 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.DeleteGroupRequest 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.DeleteGroupRequest 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.DeleteGroupRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete a group the user has access to.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteGroupRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.DeleteGroupRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.DeleteGroupRequest)
|
||||
com.heroiclabs.nakama.api.DeleteGroupRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.DeleteGroupRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return instance.getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return instance.getGroupIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder clearGroupId() {
|
||||
copyOnWrite();
|
||||
instance.clearGroupId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.DeleteGroupRequest)
|
||||
}
|
||||
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.DeleteGroupRequest();
|
||||
}
|
||||
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.DeleteGroupRequest other = (com.heroiclabs.nakama.api.DeleteGroupRequest) arg1;
|
||||
groupId_ = visitor.visitString(!groupId_.isEmpty(), groupId_,
|
||||
!other.groupId_.isEmpty(), other.groupId_);
|
||||
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();
|
||||
|
||||
groupId_ = 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.DeleteGroupRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.DeleteGroupRequest)
|
||||
private static final com.heroiclabs.nakama.api.DeleteGroupRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new DeleteGroupRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteGroupRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<DeleteGroupRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<DeleteGroupRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface DeleteGroupRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.DeleteGroupRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getGroupId();
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getGroupIdBytes();
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete a leaderboard record.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteLeaderboardRecordRequest}
|
||||
*/
|
||||
public final class DeleteLeaderboardRecordRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
DeleteLeaderboardRecordRequest, DeleteLeaderboardRecordRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.DeleteLeaderboardRecordRequest)
|
||||
DeleteLeaderboardRecordRequestOrBuilder {
|
||||
private DeleteLeaderboardRecordRequest() {
|
||||
leaderboardId_ = "";
|
||||
}
|
||||
public static final int LEADERBOARD_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String leaderboardId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getLeaderboardId() {
|
||||
return leaderboardId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(leaderboardId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </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 leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
private void clearLeaderboardId() {
|
||||
|
||||
leaderboardId_ = getDefaultInstance().getLeaderboardId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </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 void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!leaderboardId_.isEmpty()) {
|
||||
output.writeString(1, getLeaderboardId());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!leaderboardId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getLeaderboardId());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest 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.DeleteLeaderboardRecordRequest 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.DeleteLeaderboardRecordRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest 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.DeleteLeaderboardRecordRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest 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.DeleteLeaderboardRecordRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest 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.DeleteLeaderboardRecordRequest 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.DeleteLeaderboardRecordRequest 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.DeleteLeaderboardRecordRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete a leaderboard record.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteLeaderboardRecordRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.DeleteLeaderboardRecordRequest)
|
||||
com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getLeaderboardId() {
|
||||
return instance.getLeaderboardId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes() {
|
||||
return instance.getLeaderboardIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public Builder setLeaderboardId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setLeaderboardId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public Builder clearLeaderboardId() {
|
||||
copyOnWrite();
|
||||
instance.clearLeaderboardId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
public Builder setLeaderboardIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setLeaderboardIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.DeleteLeaderboardRecordRequest)
|
||||
}
|
||||
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.DeleteLeaderboardRecordRequest();
|
||||
}
|
||||
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.DeleteLeaderboardRecordRequest other = (com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest) arg1;
|
||||
leaderboardId_ = visitor.visitString(!leaderboardId_.isEmpty(), leaderboardId_,
|
||||
!other.leaderboardId_.isEmpty(), other.leaderboardId_);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
} 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.DeleteLeaderboardRecordRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.DeleteLeaderboardRecordRequest)
|
||||
private static final com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new DeleteLeaderboardRecordRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<DeleteLeaderboardRecordRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<DeleteLeaderboardRecordRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface DeleteLeaderboardRecordRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.DeleteLeaderboardRecordRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getLeaderboardId();
|
||||
/**
|
||||
* <pre>
|
||||
* The leaderboard ID to delete from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes();
|
||||
}
|
||||
+461
@@ -0,0 +1,461 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete one or more notifications for the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteNotificationsRequest}
|
||||
*/
|
||||
public final class DeleteNotificationsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
DeleteNotificationsRequest, DeleteNotificationsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.DeleteNotificationsRequest)
|
||||
DeleteNotificationsRequestOrBuilder {
|
||||
private DeleteNotificationsRequest() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
public static final int IDS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> ids_;
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String> getIdsList() {
|
||||
return ids_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return ids_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return ids_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
ids_.get(index));
|
||||
}
|
||||
private void ensureIdsIsMutable() {
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void setIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, ids_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void clearIds() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
output.writeString(1, ids_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(ids_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getIdsList().size();
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteNotificationsRequest 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.DeleteNotificationsRequest 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.DeleteNotificationsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteNotificationsRequest 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.DeleteNotificationsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteNotificationsRequest 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.DeleteNotificationsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteNotificationsRequest 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.DeleteNotificationsRequest 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.DeleteNotificationsRequest 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.DeleteNotificationsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Delete one or more notifications for the current user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteNotificationsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.DeleteNotificationsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.DeleteNotificationsRequest)
|
||||
com.heroiclabs.nakama.api.DeleteNotificationsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.DeleteNotificationsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return instance.getIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return instance.getIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return instance.getIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder setIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder clearIds() {
|
||||
copyOnWrite();
|
||||
instance.clearIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.DeleteNotificationsRequest)
|
||||
}
|
||||
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.DeleteNotificationsRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
ids_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.DeleteNotificationsRequest other = (com.heroiclabs.nakama.api.DeleteNotificationsRequest) arg1;
|
||||
ids_= visitor.visitList(ids_, other.ids_);
|
||||
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();
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
ids_.add(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.DeleteNotificationsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.DeleteNotificationsRequest)
|
||||
private static final com.heroiclabs.nakama.api.DeleteNotificationsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new DeleteNotificationsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteNotificationsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<DeleteNotificationsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<DeleteNotificationsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface DeleteNotificationsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.DeleteNotificationsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
int getIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.lang.String getIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The id of notifications.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdsBytes(int index);
|
||||
}
|
||||
+635
@@ -0,0 +1,635 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Storage objects to delete.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteStorageObjectId}
|
||||
*/
|
||||
public final class DeleteStorageObjectId extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
DeleteStorageObjectId, DeleteStorageObjectId.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.DeleteStorageObjectId)
|
||||
DeleteStorageObjectIdOrBuilder {
|
||||
private DeleteStorageObjectId() {
|
||||
collection_ = "";
|
||||
key_ = "";
|
||||
version_ = "";
|
||||
}
|
||||
public static final int COLLECTION_FIELD_NUMBER = 1;
|
||||
private java.lang.String collection_;
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
public java.lang.String getCollection() {
|
||||
return collection_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCollectionBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(collection_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
private void setCollection(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
collection_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
private void clearCollection() {
|
||||
|
||||
collection_ = getDefaultInstance().getCollection();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
private void setCollectionBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
collection_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int KEY_FIELD_NUMBER = 2;
|
||||
private java.lang.String key_;
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
public java.lang.String getKey() {
|
||||
return key_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getKeyBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(key_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
private void setKey(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
key_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
private void clearKey() {
|
||||
|
||||
key_ = getDefaultInstance().getKey();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
private void setKeyBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
key_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int VERSION_FIELD_NUMBER = 3;
|
||||
private java.lang.String version_;
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
public java.lang.String getVersion() {
|
||||
return version_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getVersionBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(version_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
private void setVersion(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
version_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
private void clearVersion() {
|
||||
|
||||
version_ = getDefaultInstance().getVersion();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
private void setVersionBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
version_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!collection_.isEmpty()) {
|
||||
output.writeString(1, getCollection());
|
||||
}
|
||||
if (!key_.isEmpty()) {
|
||||
output.writeString(2, getKey());
|
||||
}
|
||||
if (!version_.isEmpty()) {
|
||||
output.writeString(3, getVersion());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!collection_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getCollection());
|
||||
}
|
||||
if (!key_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getKey());
|
||||
}
|
||||
if (!version_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(3, getVersion());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectId 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.DeleteStorageObjectId 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.DeleteStorageObjectId parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectId 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.DeleteStorageObjectId parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectId 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.DeleteStorageObjectId parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectId 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.DeleteStorageObjectId 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.DeleteStorageObjectId 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.DeleteStorageObjectId prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Storage objects to delete.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteStorageObjectId}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectId, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.DeleteStorageObjectId)
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.DeleteStorageObjectId.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
public java.lang.String getCollection() {
|
||||
return instance.getCollection();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCollectionBytes() {
|
||||
return instance.getCollectionBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
public Builder setCollection(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setCollection(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
public Builder clearCollection() {
|
||||
copyOnWrite();
|
||||
instance.clearCollection();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
public Builder setCollectionBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setCollectionBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
public java.lang.String getKey() {
|
||||
return instance.getKey();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getKeyBytes() {
|
||||
return instance.getKeyBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
public Builder setKey(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setKey(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
public Builder clearKey() {
|
||||
copyOnWrite();
|
||||
instance.clearKey();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
public Builder setKeyBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setKeyBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
public java.lang.String getVersion() {
|
||||
return instance.getVersion();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getVersionBytes() {
|
||||
return instance.getVersionBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
public Builder setVersion(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setVersion(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
public Builder clearVersion() {
|
||||
copyOnWrite();
|
||||
instance.clearVersion();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
public Builder setVersionBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setVersionBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.DeleteStorageObjectId)
|
||||
}
|
||||
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.DeleteStorageObjectId();
|
||||
}
|
||||
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.DeleteStorageObjectId other = (com.heroiclabs.nakama.api.DeleteStorageObjectId) arg1;
|
||||
collection_ = visitor.visitString(!collection_.isEmpty(), collection_,
|
||||
!other.collection_.isEmpty(), other.collection_);
|
||||
key_ = visitor.visitString(!key_.isEmpty(), key_,
|
||||
!other.key_.isEmpty(), other.key_);
|
||||
version_ = visitor.visitString(!version_.isEmpty(), version_,
|
||||
!other.version_.isEmpty(), other.version_);
|
||||
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();
|
||||
|
||||
collection_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
key_ = s;
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
version_ = 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.DeleteStorageObjectId.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.DeleteStorageObjectId)
|
||||
private static final com.heroiclabs.nakama.api.DeleteStorageObjectId DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new DeleteStorageObjectId();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectId getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<DeleteStorageObjectId> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<DeleteStorageObjectId> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface DeleteStorageObjectIdOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.DeleteStorageObjectId)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
java.lang.String getCollection();
|
||||
/**
|
||||
* <pre>
|
||||
* The collection which stores the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string collection = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCollectionBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
java.lang.String getKey();
|
||||
/**
|
||||
* <pre>
|
||||
* The key of the object within the collection.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string key = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getKeyBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
java.lang.String getVersion();
|
||||
/**
|
||||
* <pre>
|
||||
* The version hash of the object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string version = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getVersionBytes();
|
||||
}
|
||||
+549
@@ -0,0 +1,549 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Batch delete storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteStorageObjectsRequest}
|
||||
*/
|
||||
public final class DeleteStorageObjectsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
DeleteStorageObjectsRequest, DeleteStorageObjectsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.DeleteStorageObjectsRequest)
|
||||
DeleteStorageObjectsRequestOrBuilder {
|
||||
private DeleteStorageObjectsRequest() {
|
||||
objectIds_ = emptyProtobufList();
|
||||
}
|
||||
public static final int OBJECT_IDS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<com.heroiclabs.nakama.api.DeleteStorageObjectId> objectIds_;
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.DeleteStorageObjectId> getObjectIdsList() {
|
||||
return objectIds_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<? extends com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder>
|
||||
getObjectIdsOrBuilderList() {
|
||||
return objectIds_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public int getObjectIdsCount() {
|
||||
return objectIds_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.DeleteStorageObjectId getObjectIds(int index) {
|
||||
return objectIds_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder getObjectIdsOrBuilder(
|
||||
int index) {
|
||||
return objectIds_.get(index);
|
||||
}
|
||||
private void ensureObjectIdsIsMutable() {
|
||||
if (!objectIds_.isModifiable()) {
|
||||
objectIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(objectIds_);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void setObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureObjectIdsIsMutable();
|
||||
objectIds_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void setObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) {
|
||||
ensureObjectIdsIsMutable();
|
||||
objectIds_.set(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void addObjectIds(com.heroiclabs.nakama.api.DeleteStorageObjectId value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureObjectIdsIsMutable();
|
||||
objectIds_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void addObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureObjectIdsIsMutable();
|
||||
objectIds_.add(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void addObjectIds(
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) {
|
||||
ensureObjectIdsIsMutable();
|
||||
objectIds_.add(builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void addObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) {
|
||||
ensureObjectIdsIsMutable();
|
||||
objectIds_.add(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void addAllObjectIds(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.DeleteStorageObjectId> values) {
|
||||
ensureObjectIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, objectIds_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void clearObjectIds() {
|
||||
objectIds_ = emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
private void removeObjectIds(int index) {
|
||||
ensureObjectIdsIsMutable();
|
||||
objectIds_.remove(index);
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < objectIds_.size(); i++) {
|
||||
output.writeMessage(1, objectIds_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
for (int i = 0; i < objectIds_.size(); i++) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, objectIds_.get(i));
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest 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.DeleteStorageObjectsRequest 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.DeleteStorageObjectsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest 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.DeleteStorageObjectsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest 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.DeleteStorageObjectsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest 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.DeleteStorageObjectsRequest 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.DeleteStorageObjectsRequest 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.DeleteStorageObjectsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Batch delete storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.DeleteStorageObjectsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.DeleteStorageObjectsRequest)
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.DeleteStorageObjectId> getObjectIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getObjectIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public int getObjectIdsCount() {
|
||||
return instance.getObjectIdsCount();
|
||||
}/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.DeleteStorageObjectId getObjectIds(int index) {
|
||||
return instance.getObjectIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder setObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId value) {
|
||||
copyOnWrite();
|
||||
instance.setObjectIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder setObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setObjectIds(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder addObjectIds(com.heroiclabs.nakama.api.DeleteStorageObjectId value) {
|
||||
copyOnWrite();
|
||||
instance.addObjectIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder addObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId value) {
|
||||
copyOnWrite();
|
||||
instance.addObjectIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder addObjectIds(
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addObjectIds(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder addObjectIds(
|
||||
int index, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addObjectIds(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder addAllObjectIds(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.DeleteStorageObjectId> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllObjectIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder clearObjectIds() {
|
||||
copyOnWrite();
|
||||
instance.clearObjectIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
public Builder removeObjectIds(int index) {
|
||||
copyOnWrite();
|
||||
instance.removeObjectIds(index);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.DeleteStorageObjectsRequest)
|
||||
}
|
||||
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.DeleteStorageObjectsRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
objectIds_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectsRequest other = (com.heroiclabs.nakama.api.DeleteStorageObjectsRequest) arg1;
|
||||
objectIds_= visitor.visitList(objectIds_, other.objectIds_);
|
||||
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: {
|
||||
if (!objectIds_.isModifiable()) {
|
||||
objectIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(objectIds_);
|
||||
}
|
||||
objectIds_.add(
|
||||
input.readMessage(com.heroiclabs.nakama.api.DeleteStorageObjectId.parser(), extensionRegistry));
|
||||
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.DeleteStorageObjectsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.DeleteStorageObjectsRequest)
|
||||
private static final com.heroiclabs.nakama.api.DeleteStorageObjectsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new DeleteStorageObjectsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<DeleteStorageObjectsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<DeleteStorageObjectsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface DeleteStorageObjectsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.DeleteStorageObjectsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.DeleteStorageObjectId>
|
||||
getObjectIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.DeleteStorageObjectId getObjectIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* Batch of storage objects.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.DeleteStorageObjectId object_ids = 1;</code>
|
||||
*/
|
||||
int getObjectIdsCount();
|
||||
}
|
||||
@@ -0,0 +1,662 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A friend of a user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.Friend}
|
||||
*/
|
||||
public final class Friend extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
Friend, Friend.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.Friend)
|
||||
FriendOrBuilder {
|
||||
private Friend() {
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friendship status.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf enum {@code nakama.api.Friend.State}
|
||||
*/
|
||||
public enum State
|
||||
implements com.google.protobuf.Internal.EnumLite {
|
||||
/**
|
||||
* <pre>
|
||||
* The user is a friend of the current user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>FRIEND = 0;</code>
|
||||
*/
|
||||
FRIEND(0),
|
||||
/**
|
||||
* <pre>
|
||||
* The current user has sent an invite to the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>INVITE_SENT = 1;</code>
|
||||
*/
|
||||
INVITE_SENT(1),
|
||||
/**
|
||||
* <pre>
|
||||
* The current user has received an invite from this user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>INVITE_RECEIVED = 2;</code>
|
||||
*/
|
||||
INVITE_RECEIVED(2),
|
||||
/**
|
||||
* <pre>
|
||||
* The current user has blocked this user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>BLOCKED = 3;</code>
|
||||
*/
|
||||
BLOCKED(3),
|
||||
UNRECOGNIZED(-1),
|
||||
;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The user is a friend of the current user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>FRIEND = 0;</code>
|
||||
*/
|
||||
public static final int FRIEND_VALUE = 0;
|
||||
/**
|
||||
* <pre>
|
||||
* The current user has sent an invite to the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>INVITE_SENT = 1;</code>
|
||||
*/
|
||||
public static final int INVITE_SENT_VALUE = 1;
|
||||
/**
|
||||
* <pre>
|
||||
* The current user has received an invite from this user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>INVITE_RECEIVED = 2;</code>
|
||||
*/
|
||||
public static final int INVITE_RECEIVED_VALUE = 2;
|
||||
/**
|
||||
* <pre>
|
||||
* The current user has blocked this user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>BLOCKED = 3;</code>
|
||||
*/
|
||||
public static final int BLOCKED_VALUE = 3;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #forNumber(int)} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public static State valueOf(int value) {
|
||||
return forNumber(value);
|
||||
}
|
||||
|
||||
public static State forNumber(int value) {
|
||||
switch (value) {
|
||||
case 0: return FRIEND;
|
||||
case 1: return INVITE_SENT;
|
||||
case 2: return INVITE_RECEIVED;
|
||||
case 3: return BLOCKED;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<State>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static final com.google.protobuf.Internal.EnumLiteMap<
|
||||
State> internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<State>() {
|
||||
public State findValueByNumber(int number) {
|
||||
return State.forNumber(number);
|
||||
}
|
||||
};
|
||||
|
||||
private final int value;
|
||||
|
||||
private State(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:nakama.api.Friend.State)
|
||||
}
|
||||
|
||||
public static final int USER_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.User user_;
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public boolean hasUser() {
|
||||
return user_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.User getUser() {
|
||||
return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
private void setUser(com.heroiclabs.nakama.api.User value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
user_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
private void setUser(
|
||||
com.heroiclabs.nakama.api.User.Builder builderForValue) {
|
||||
user_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
private void mergeUser(com.heroiclabs.nakama.api.User value) {
|
||||
if (user_ != null &&
|
||||
user_ != com.heroiclabs.nakama.api.User.getDefaultInstance()) {
|
||||
user_ =
|
||||
com.heroiclabs.nakama.api.User.newBuilder(user_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
user_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
private void clearUser() { user_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int STATE_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Int32Value state_;
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public boolean hasState() {
|
||||
return state_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getState() {
|
||||
return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
private void setState(com.google.protobuf.Int32Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
state_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
private void setState(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
state_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
private void mergeState(com.google.protobuf.Int32Value value) {
|
||||
if (state_ != null &&
|
||||
state_ != com.google.protobuf.Int32Value.getDefaultInstance()) {
|
||||
state_ =
|
||||
com.google.protobuf.Int32Value.newBuilder(state_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
state_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
private void clearState() { state_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (user_ != null) {
|
||||
output.writeMessage(1, getUser());
|
||||
}
|
||||
if (state_ != null) {
|
||||
output.writeMessage(2, getState());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (user_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getUser());
|
||||
}
|
||||
if (state_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getState());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.Friend 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.Friend 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.Friend parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.Friend 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.Friend parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.Friend 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.Friend parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.Friend 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.Friend 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.Friend 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.Friend prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A friend of a user.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.Friend}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.Friend, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.Friend)
|
||||
com.heroiclabs.nakama.api.FriendOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.Friend.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public boolean hasUser() {
|
||||
return instance.hasUser();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.User getUser() {
|
||||
return instance.getUser();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public Builder setUser(com.heroiclabs.nakama.api.User value) {
|
||||
copyOnWrite();
|
||||
instance.setUser(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public Builder setUser(
|
||||
com.heroiclabs.nakama.api.User.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setUser(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public Builder mergeUser(com.heroiclabs.nakama.api.User value) {
|
||||
copyOnWrite();
|
||||
instance.mergeUser(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
public Builder clearUser() { copyOnWrite();
|
||||
instance.clearUser();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public boolean hasState() {
|
||||
return instance.hasState();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getState() {
|
||||
return instance.getState();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public Builder setState(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setState(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public Builder setState(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setState(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public Builder mergeState(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeState(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
public Builder clearState() { copyOnWrite();
|
||||
instance.clearState();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.Friend)
|
||||
}
|
||||
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.Friend();
|
||||
}
|
||||
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.Friend other = (com.heroiclabs.nakama.api.Friend) arg1;
|
||||
user_ = visitor.visitMessage(user_, other.user_);
|
||||
state_ = visitor.visitMessage(state_, other.state_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.User.Builder subBuilder = null;
|
||||
if (user_ != null) {
|
||||
subBuilder = user_.toBuilder();
|
||||
}
|
||||
user_ = input.readMessage(com.heroiclabs.nakama.api.User.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(user_);
|
||||
user_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.Int32Value.Builder subBuilder = null;
|
||||
if (state_ != null) {
|
||||
subBuilder = state_.toBuilder();
|
||||
}
|
||||
state_ = input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(state_);
|
||||
state_ = 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.Friend.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.Friend)
|
||||
private static final com.heroiclabs.nakama.api.Friend DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new Friend();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.Friend getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<Friend> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<Friend> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface FriendOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.Friend)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
boolean hasUser();
|
||||
/**
|
||||
* <pre>
|
||||
* The user object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.User user = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.User getUser();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
boolean hasState();
|
||||
/**
|
||||
* <pre>
|
||||
* The friend status.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getState();
|
||||
}
|
||||
+965
@@ -0,0 +1,965 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Fetch a batch of zero or more users from the server.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.GetUsersRequest}
|
||||
*/
|
||||
public final class GetUsersRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
GetUsersRequest, GetUsersRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.GetUsersRequest)
|
||||
GetUsersRequestOrBuilder {
|
||||
private GetUsersRequest() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
facebookIds_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
public static final int IDS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> ids_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String> getIdsList() {
|
||||
return ids_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return ids_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return ids_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
ids_.get(index));
|
||||
}
|
||||
private void ensureIdsIsMutable() {
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void setIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, ids_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void clearIds() {
|
||||
ids_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
private void addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureIdsIsMutable();
|
||||
ids_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public static final int USERNAMES_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> usernames_;
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String> getUsernamesList() {
|
||||
return usernames_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return usernames_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return usernames_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
usernames_.get(index));
|
||||
}
|
||||
private void ensureUsernamesIsMutable() {
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernames(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureUsernamesIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, usernames_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void clearUsernames() {
|
||||
usernames_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
private void addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureUsernamesIsMutable();
|
||||
usernames_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public static final int FACEBOOK_IDS_FIELD_NUMBER = 3;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> facebookIds_;
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public java.util.List<String> getFacebookIdsList() {
|
||||
return facebookIds_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public int getFacebookIdsCount() {
|
||||
return facebookIds_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public java.lang.String getFacebookIds(int index) {
|
||||
return facebookIds_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getFacebookIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
facebookIds_.get(index));
|
||||
}
|
||||
private void ensureFacebookIdsIsMutable() {
|
||||
if (!facebookIds_.isModifiable()) {
|
||||
facebookIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(facebookIds_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
private void setFacebookIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureFacebookIdsIsMutable();
|
||||
facebookIds_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
private void addFacebookIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureFacebookIdsIsMutable();
|
||||
facebookIds_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
private void addAllFacebookIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureFacebookIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, facebookIds_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
private void clearFacebookIds() {
|
||||
facebookIds_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
private void addFacebookIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureFacebookIdsIsMutable();
|
||||
facebookIds_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
output.writeString(1, ids_.get(i));
|
||||
}
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
output.writeString(2, usernames_.get(i));
|
||||
}
|
||||
for (int i = 0; i < facebookIds_.size(); i++) {
|
||||
output.writeString(3, facebookIds_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < ids_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(ids_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getIdsList().size();
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < usernames_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(usernames_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getUsernamesList().size();
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < facebookIds_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(facebookIds_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getFacebookIdsList().size();
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.GetUsersRequest 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.GetUsersRequest 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.GetUsersRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.GetUsersRequest 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.GetUsersRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.GetUsersRequest 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.GetUsersRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.GetUsersRequest 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.GetUsersRequest 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.GetUsersRequest 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.GetUsersRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Fetch a batch of zero or more users from the server.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.GetUsersRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.GetUsersRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.GetUsersRequest)
|
||||
com.heroiclabs.nakama.api.GetUsersRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.GetUsersRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public int getIdsCount() {
|
||||
return instance.getIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public java.lang.String getIds(int index) {
|
||||
return instance.getIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getIdsBytes(int index) {
|
||||
return instance.getIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder setIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addAllIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder clearIds() {
|
||||
copyOnWrite();
|
||||
instance.clearIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
public Builder addIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getUsernamesList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getUsernamesList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public int getUsernamesCount() {
|
||||
return instance.getUsernamesCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUsernames(int index) {
|
||||
return instance.getUsernames(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index) {
|
||||
return instance.getUsernamesBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder setUsernames(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUsernames(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernames(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernames(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addAllUsernames(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllUsernames(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder clearUsernames() {
|
||||
copyOnWrite();
|
||||
instance.clearUsernames();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
public Builder addUsernamesBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addUsernamesBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getFacebookIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getFacebookIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public int getFacebookIdsCount() {
|
||||
return instance.getFacebookIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public java.lang.String getFacebookIds(int index) {
|
||||
return instance.getFacebookIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getFacebookIdsBytes(int index) {
|
||||
return instance.getFacebookIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public Builder setFacebookIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setFacebookIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public Builder addFacebookIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addFacebookIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public Builder addAllFacebookIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllFacebookIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public Builder clearFacebookIds() {
|
||||
copyOnWrite();
|
||||
instance.clearFacebookIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
public Builder addFacebookIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addFacebookIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.GetUsersRequest)
|
||||
}
|
||||
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.GetUsersRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
ids_.makeImmutable();
|
||||
usernames_.makeImmutable();
|
||||
facebookIds_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.GetUsersRequest other = (com.heroiclabs.nakama.api.GetUsersRequest) arg1;
|
||||
ids_= visitor.visitList(ids_, other.ids_);
|
||||
usernames_= visitor.visitList(usernames_, other.usernames_);
|
||||
facebookIds_= visitor.visitList(facebookIds_, other.facebookIds_);
|
||||
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();
|
||||
if (!ids_.isModifiable()) {
|
||||
ids_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(ids_);
|
||||
}
|
||||
ids_.add(s);
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
if (!usernames_.isModifiable()) {
|
||||
usernames_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(usernames_);
|
||||
}
|
||||
usernames_.add(s);
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
if (!facebookIds_.isModifiable()) {
|
||||
facebookIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(facebookIds_);
|
||||
}
|
||||
facebookIds_.add(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.GetUsersRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.GetUsersRequest)
|
||||
private static final com.heroiclabs.nakama.api.GetUsersRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new GetUsersRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.GetUsersRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<GetUsersRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<GetUsersRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface GetUsersRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.GetUsersRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
int getIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
java.lang.String getIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account id of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string ids = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdsBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getUsernamesList();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
int getUsernamesCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
java.lang.String getUsernames(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The account username of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string usernames = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUsernamesBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getFacebookIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
int getFacebookIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
java.lang.String getFacebookIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook ID of a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string facebook_ids = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getFacebookIdsBytes(int index);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,693 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups returned from a listing operation.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.GroupList}
|
||||
*/
|
||||
public final class GroupList extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
GroupList, GroupList.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.GroupList)
|
||||
GroupListOrBuilder {
|
||||
private GroupList() {
|
||||
groups_ = emptyProtobufList();
|
||||
cursor_ = "";
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int GROUPS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Internal.ProtobufList<com.heroiclabs.nakama.api.Group> groups_;
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.Group> getGroupsList() {
|
||||
return groups_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public java.util.List<? extends com.heroiclabs.nakama.api.GroupOrBuilder>
|
||||
getGroupsOrBuilderList() {
|
||||
return groups_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public int getGroupsCount() {
|
||||
return groups_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.Group getGroups(int index) {
|
||||
return groups_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.GroupOrBuilder getGroupsOrBuilder(
|
||||
int index) {
|
||||
return groups_.get(index);
|
||||
}
|
||||
private void ensureGroupsIsMutable() {
|
||||
if (!groups_.isModifiable()) {
|
||||
groups_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(groups_);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void setGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureGroupsIsMutable();
|
||||
groups_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void setGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group.Builder builderForValue) {
|
||||
ensureGroupsIsMutable();
|
||||
groups_.set(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void addGroups(com.heroiclabs.nakama.api.Group value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureGroupsIsMutable();
|
||||
groups_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void addGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureGroupsIsMutable();
|
||||
groups_.add(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void addGroups(
|
||||
com.heroiclabs.nakama.api.Group.Builder builderForValue) {
|
||||
ensureGroupsIsMutable();
|
||||
groups_.add(builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void addGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group.Builder builderForValue) {
|
||||
ensureGroupsIsMutable();
|
||||
groups_.add(index, builderForValue.build());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void addAllGroups(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.Group> values) {
|
||||
ensureGroupsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, groups_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void clearGroups() {
|
||||
groups_ = emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
private void removeGroups(int index) {
|
||||
ensureGroupsIsMutable();
|
||||
groups_.remove(index);
|
||||
}
|
||||
|
||||
public static final int CURSOR_FIELD_NUMBER = 2;
|
||||
private java.lang.String cursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return cursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(cursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
private void setCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
cursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
private void clearCursor() {
|
||||
|
||||
cursor_ = getDefaultInstance().getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </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 < groups_.size(); i++) {
|
||||
output.writeMessage(1, groups_.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 < groups_.size(); i++) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, groups_.get(i));
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getCursor());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.GroupList 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.GroupList 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.GroupList parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.GroupList 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.GroupList parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.GroupList 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.GroupList parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.GroupList 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.GroupList 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.GroupList 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.GroupList prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups returned from a listing operation.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.GroupList}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.GroupList, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.GroupList)
|
||||
com.heroiclabs.nakama.api.GroupListOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.GroupList.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public java.util.List<com.heroiclabs.nakama.api.Group> getGroupsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getGroupsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public int getGroupsCount() {
|
||||
return instance.getGroupsCount();
|
||||
}/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.Group getGroups(int index) {
|
||||
return instance.getGroups(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder setGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group value) {
|
||||
copyOnWrite();
|
||||
instance.setGroups(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder setGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setGroups(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder addGroups(com.heroiclabs.nakama.api.Group value) {
|
||||
copyOnWrite();
|
||||
instance.addGroups(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder addGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group value) {
|
||||
copyOnWrite();
|
||||
instance.addGroups(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder addGroups(
|
||||
com.heroiclabs.nakama.api.Group.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addGroups(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder addGroups(
|
||||
int index, com.heroiclabs.nakama.api.Group.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.addGroups(index, builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder addAllGroups(
|
||||
java.lang.Iterable<? extends com.heroiclabs.nakama.api.Group> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllGroups(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder clearGroups() {
|
||||
copyOnWrite();
|
||||
instance.clearGroups();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
public Builder removeGroups(int index) {
|
||||
copyOnWrite();
|
||||
instance.removeGroups(index);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return instance.getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return instance.getCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder setCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder clearCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </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.GroupList)
|
||||
}
|
||||
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.GroupList();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
groups_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.GroupList other = (com.heroiclabs.nakama.api.GroupList) arg1;
|
||||
groups_= visitor.visitList(groups_, other.groups_);
|
||||
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 (!groups_.isModifiable()) {
|
||||
groups_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(groups_);
|
||||
}
|
||||
groups_.add(
|
||||
input.readMessage(com.heroiclabs.nakama.api.Group.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.GroupList.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.GroupList)
|
||||
private static final com.heroiclabs.nakama.api.GroupList DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new GroupList();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.GroupList getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<GroupList> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<GroupList> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface GroupListOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.GroupList)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.Group>
|
||||
getGroupsList();
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.Group getGroups(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* One or more groups.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.Group groups = 1;</code>
|
||||
*/
|
||||
int getGroupsCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor used to get the next page.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
}
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface GroupOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.Group)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
java.lang.String getId();
|
||||
/**
|
||||
* <pre>
|
||||
* The id of a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The id of the user who created the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string creator_id = 2;</code>
|
||||
*/
|
||||
java.lang.String getCreatorId();
|
||||
/**
|
||||
* <pre>
|
||||
* The id of the user who created the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string creator_id = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCreatorIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The unique name of the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 3;</code>
|
||||
*/
|
||||
java.lang.String getName();
|
||||
/**
|
||||
* <pre>
|
||||
* The unique name of the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNameBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 4;</code>
|
||||
*/
|
||||
java.lang.String getDescription();
|
||||
/**
|
||||
* <pre>
|
||||
* A description for the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string description = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getDescriptionBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 5;</code>
|
||||
*/
|
||||
java.lang.String getLangTag();
|
||||
/**
|
||||
* <pre>
|
||||
* The language expected to be a tag which follows the BCP-47 spec.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string lang_tag = 5;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getLangTagBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Additional information stored as a JSON object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string metadata = 6;</code>
|
||||
*/
|
||||
java.lang.String getMetadata();
|
||||
/**
|
||||
* <pre>
|
||||
* Additional information stored as a JSON object.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string metadata = 6;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMetadataBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 7;</code>
|
||||
*/
|
||||
java.lang.String getAvatarUrl();
|
||||
/**
|
||||
* <pre>
|
||||
* A URL for an avatar image.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string avatar_url = 7;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getAvatarUrlBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Anyone can join open groups, otherwise only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue open = 8;</code>
|
||||
*/
|
||||
boolean hasOpen();
|
||||
/**
|
||||
* <pre>
|
||||
* Anyone can join open groups, otherwise only admins can accept members.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue open = 8;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getOpen();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The current count of all members in the group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 edge_count = 9;</code>
|
||||
*/
|
||||
int getEdgeCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The maximum number of members allowed.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 max_count = 10;</code>
|
||||
*/
|
||||
int getMaxCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the group was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 11;</code>
|
||||
*/
|
||||
boolean hasCreateTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the group was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 11;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getCreateTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the group was last updated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp update_time = 12;</code>
|
||||
*/
|
||||
boolean hasUpdateTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the group was last updated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp update_time = 12;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getUpdateTime();
|
||||
}
|
||||
+1388
File diff suppressed because it is too large.
Load diff
+53
@@ -0,0 +1,53 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface GroupUserListOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.GroupUserList)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* User-role pairs for a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.GroupUserList.GroupUser group_users = 1;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.GroupUserList.GroupUser>
|
||||
getGroupUsersList();
|
||||
/**
|
||||
* <pre>
|
||||
* User-role pairs for a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.GroupUserList.GroupUser group_users = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.GroupUserList.GroupUser getGroupUsers(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* User-role pairs for a group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.GroupUserList.GroupUser group_users = 1;</code>
|
||||
*/
|
||||
int getGroupUsersCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Cursor for the next page of results, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* Cursor for the next page of results, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
}
|
||||
+541
@@ -0,0 +1,541 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends into the current user's account.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ImportFacebookFriendsRequest}
|
||||
*/
|
||||
public final class ImportFacebookFriendsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ImportFacebookFriendsRequest, ImportFacebookFriendsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ImportFacebookFriendsRequest)
|
||||
ImportFacebookFriendsRequestOrBuilder {
|
||||
private ImportFacebookFriendsRequest() {
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountFacebook account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountFacebook getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountFacebook.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int RESET_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.BoolValue reset_;
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public boolean hasReset() {
|
||||
return reset_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getReset() {
|
||||
return reset_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : reset_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
private void setReset(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
reset_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
private void setReset(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
reset_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
private void mergeReset(com.google.protobuf.BoolValue value) {
|
||||
if (reset_ != null &&
|
||||
reset_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
reset_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(reset_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
reset_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
private void clearReset() { reset_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (reset_ != null) {
|
||||
output.writeMessage(2, getReset());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (reset_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getReset());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest 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.ImportFacebookFriendsRequest 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.ImportFacebookFriendsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest 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.ImportFacebookFriendsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest 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.ImportFacebookFriendsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest 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.ImportFacebookFriendsRequest 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.ImportFacebookFriendsRequest 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.ImportFacebookFriendsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends into the current user's account.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ImportFacebookFriendsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ImportFacebookFriendsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ImportFacebookFriendsRequest)
|
||||
com.heroiclabs.nakama.api.ImportFacebookFriendsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountFacebook getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public boolean hasReset() {
|
||||
return instance.hasReset();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getReset() {
|
||||
return instance.getReset();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public Builder setReset(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setReset(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public Builder setReset(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setReset(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public Builder mergeReset(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeReset(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
public Builder clearReset() { copyOnWrite();
|
||||
instance.clearReset();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ImportFacebookFriendsRequest)
|
||||
}
|
||||
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.ImportFacebookFriendsRequest();
|
||||
}
|
||||
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.ImportFacebookFriendsRequest other = (com.heroiclabs.nakama.api.ImportFacebookFriendsRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
reset_ = visitor.visitMessage(reset_, other.reset_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountFacebook.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (reset_ != null) {
|
||||
subBuilder = reset_.toBuilder();
|
||||
}
|
||||
reset_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(reset_);
|
||||
reset_ = 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.ImportFacebookFriendsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ImportFacebookFriendsRequest)
|
||||
private static final com.heroiclabs.nakama.api.ImportFacebookFriendsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ImportFacebookFriendsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ImportFacebookFriendsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ImportFacebookFriendsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ImportFacebookFriendsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ImportFacebookFriendsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountFacebook getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
boolean hasReset();
|
||||
/**
|
||||
* <pre>
|
||||
* Reset the current user's friends list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue reset = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getReset();
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Immediately join an open group, or request to join a closed one.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.JoinGroupRequest}
|
||||
*/
|
||||
public final class JoinGroupRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
JoinGroupRequest, JoinGroupRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.JoinGroupRequest)
|
||||
JoinGroupRequestOrBuilder {
|
||||
private JoinGroupRequest() {
|
||||
groupId_ = "";
|
||||
}
|
||||
public static final int GROUP_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String groupId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return groupId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(groupId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
groupId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void clearGroupId() {
|
||||
|
||||
groupId_ = getDefaultInstance().getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
groupId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!groupId_.isEmpty()) {
|
||||
output.writeString(1, getGroupId());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!groupId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getGroupId());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.JoinGroupRequest 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.JoinGroupRequest 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.JoinGroupRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinGroupRequest 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.JoinGroupRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinGroupRequest 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.JoinGroupRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.JoinGroupRequest 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.JoinGroupRequest 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.JoinGroupRequest 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.JoinGroupRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Immediately join an open group, or request to join a closed one.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.JoinGroupRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.JoinGroupRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.JoinGroupRequest)
|
||||
com.heroiclabs.nakama.api.JoinGroupRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.JoinGroupRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return instance.getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return instance.getGroupIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder clearGroupId() {
|
||||
copyOnWrite();
|
||||
instance.clearGroupId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.JoinGroupRequest)
|
||||
}
|
||||
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.JoinGroupRequest();
|
||||
}
|
||||
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.JoinGroupRequest other = (com.heroiclabs.nakama.api.JoinGroupRequest) arg1;
|
||||
groupId_ = visitor.visitString(!groupId_.isEmpty(), groupId_,
|
||||
!other.groupId_.isEmpty(), other.groupId_);
|
||||
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();
|
||||
|
||||
groupId_ = 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.JoinGroupRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.JoinGroupRequest)
|
||||
private static final com.heroiclabs.nakama.api.JoinGroupRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new JoinGroupRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.JoinGroupRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<JoinGroupRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<JoinGroupRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface JoinGroupRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.JoinGroupRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getGroupId();
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to join. The group must already exist.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getGroupIdBytes();
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/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-common/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();
|
||||
}
|
||||
+605
@@ -0,0 +1,605 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Kick a set of users from a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.KickGroupUsersRequest}
|
||||
*/
|
||||
public final class KickGroupUsersRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
KickGroupUsersRequest, KickGroupUsersRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.KickGroupUsersRequest)
|
||||
KickGroupUsersRequestOrBuilder {
|
||||
private KickGroupUsersRequest() {
|
||||
groupId_ = "";
|
||||
userIds_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
private int bitField0_;
|
||||
public static final int GROUP_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String groupId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return groupId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(groupId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
groupId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void clearGroupId() {
|
||||
|
||||
groupId_ = getDefaultInstance().getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
groupId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int USER_IDS_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Internal.ProtobufList<String> userIds_;
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.util.List<String> getUserIdsList() {
|
||||
return userIds_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public int getUserIdsCount() {
|
||||
return userIds_.size();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUserIds(int index) {
|
||||
return userIds_.get(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUserIdsBytes(int index) {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(
|
||||
userIds_.get(index));
|
||||
}
|
||||
private void ensureUserIdsIsMutable() {
|
||||
if (!userIds_.isModifiable()) {
|
||||
userIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(userIds_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void setUserIds(
|
||||
int index, java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUserIdsIsMutable();
|
||||
userIds_.set(index, value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void addUserIds(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureUserIdsIsMutable();
|
||||
userIds_.add(value);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void addAllUserIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
ensureUserIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.addAll(
|
||||
values, userIds_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void clearUserIds() {
|
||||
userIds_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
private void addUserIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
ensureUserIdsIsMutable();
|
||||
userIds_.add(value.toStringUtf8());
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!groupId_.isEmpty()) {
|
||||
output.writeString(1, getGroupId());
|
||||
}
|
||||
for (int i = 0; i < userIds_.size(); i++) {
|
||||
output.writeString(2, userIds_.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!groupId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getGroupId());
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < userIds_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSizeNoTag(userIds_.get(i));
|
||||
}
|
||||
size += dataSize;
|
||||
size += 1 * getUserIdsList().size();
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.KickGroupUsersRequest 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.KickGroupUsersRequest 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.KickGroupUsersRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.KickGroupUsersRequest 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.KickGroupUsersRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.KickGroupUsersRequest 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.KickGroupUsersRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.KickGroupUsersRequest 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.KickGroupUsersRequest 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.KickGroupUsersRequest 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.KickGroupUsersRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Kick a set of users from a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.KickGroupUsersRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.KickGroupUsersRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.KickGroupUsersRequest)
|
||||
com.heroiclabs.nakama.api.KickGroupUsersRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.KickGroupUsersRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return instance.getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return instance.getGroupIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder clearGroupId() {
|
||||
copyOnWrite();
|
||||
instance.clearGroupId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.util.List<String>
|
||||
getUserIdsList() {
|
||||
return java.util.Collections.unmodifiableList(
|
||||
instance.getUserIdsList());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public int getUserIdsCount() {
|
||||
return instance.getUserIdsCount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public java.lang.String getUserIds(int index) {
|
||||
return instance.getUserIds(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getUserIdsBytes(int index) {
|
||||
return instance.getUserIdsBytes(index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder setUserIds(
|
||||
int index, java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setUserIds(index, value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder addUserIds(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.addUserIds(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder addAllUserIds(
|
||||
java.lang.Iterable<java.lang.String> values) {
|
||||
copyOnWrite();
|
||||
instance.addAllUserIds(values);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder clearUserIds() {
|
||||
copyOnWrite();
|
||||
instance.clearUserIds();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
public Builder addUserIdsBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.addUserIdsBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.KickGroupUsersRequest)
|
||||
}
|
||||
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.KickGroupUsersRequest();
|
||||
}
|
||||
case IS_INITIALIZED: {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
case MAKE_IMMUTABLE: {
|
||||
userIds_.makeImmutable();
|
||||
return null;
|
||||
}
|
||||
case NEW_BUILDER: {
|
||||
return new Builder();
|
||||
}
|
||||
case VISIT: {
|
||||
Visitor visitor = (Visitor) arg0;
|
||||
com.heroiclabs.nakama.api.KickGroupUsersRequest other = (com.heroiclabs.nakama.api.KickGroupUsersRequest) arg1;
|
||||
groupId_ = visitor.visitString(!groupId_.isEmpty(), groupId_,
|
||||
!other.groupId_.isEmpty(), other.groupId_);
|
||||
userIds_= visitor.visitList(userIds_, other.userIds_);
|
||||
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: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
groupId_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
if (!userIds_.isModifiable()) {
|
||||
userIds_ =
|
||||
com.google.protobuf.GeneratedMessageLite.mutableCopy(userIds_);
|
||||
}
|
||||
userIds_.add(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.KickGroupUsersRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.KickGroupUsersRequest)
|
||||
private static final com.heroiclabs.nakama.api.KickGroupUsersRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new KickGroupUsersRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.KickGroupUsersRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<KickGroupUsersRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<KickGroupUsersRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface KickGroupUsersRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.KickGroupUsersRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getGroupId();
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to kick from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getGroupIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
java.util.List<String>
|
||||
getUserIdsList();
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
int getUserIdsCount();
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
java.lang.String getUserIds(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* The users to kick.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string user_ids = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getUserIdsBytes(int index);
|
||||
}
|
||||
+1719
File diff suppressed because it is too large.
Load diff
+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-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface LeaderboardRecordListOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.LeaderboardRecordList)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A list of leaderboard records.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord records = 1;</code>
|
||||
*/
|
||||
java.util.List<com.heroiclabs.nakama.api.LeaderboardRecord>
|
||||
getRecordsList();
|
||||
/**
|
||||
* <pre>
|
||||
* A list of leaderboard records.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord records = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* A list of leaderboard records.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord records = 1;</code>
|
||||
*/
|
||||
int getRecordsCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A batched set of leaderboard 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 leaderboard 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 leaderboard records belonging to specified owners.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .nakama.api.LeaderboardRecord owner_records = 2;</code>
|
||||
*/
|
||||
int getOwnerRecordsCount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 3;</code>
|
||||
*/
|
||||
java.lang.String getNextCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the next page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string next_cursor = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNextCursorBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 4;</code>
|
||||
*/
|
||||
java.lang.String getPrevCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* The cursor to send when retrieving the previous page, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string prev_cursor = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getPrevCursorBytes();
|
||||
}
|
||||
+176
@@ -0,0 +1,176 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface LeaderboardRecordOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.LeaderboardRecord)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the leaderboard this score belongs to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getLeaderboardId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the leaderboard this score belongs to.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the score owner, usually a user or group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 2;</code>
|
||||
*/
|
||||
java.lang.String getOwnerId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the score owner, usually a user or group.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string owner_id = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getOwnerIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The username of the score owner, if the owner is a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.StringValue username = 3;</code>
|
||||
*/
|
||||
boolean hasUsername();
|
||||
/**
|
||||
* <pre>
|
||||
* The username of the score owner, if the owner is a user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.StringValue username = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.StringValue getUsername();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The score value.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int64 score = 4;</code>
|
||||
*/
|
||||
long getScore();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* An optional subscore value.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int64 subscore = 5;</code>
|
||||
*/
|
||||
long getSubscore();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The number of submissions to this score record.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int32 num_score = 6;</code>
|
||||
*/
|
||||
int getNumScore();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Metadata.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string metadata = 7;</code>
|
||||
*/
|
||||
java.lang.String getMetadata();
|
||||
/**
|
||||
* <pre>
|
||||
* Metadata.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string metadata = 7;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMetadataBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the leaderboard record was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 8;</code>
|
||||
*/
|
||||
boolean hasCreateTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the leaderboard record was created.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp create_time = 8;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getCreateTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the leaderboard record was updated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp update_time = 9;</code>
|
||||
*/
|
||||
boolean hasUpdateTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the leaderboard record was updated.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp update_time = 9;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getUpdateTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the leaderboard record expires.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp expiry_time = 10;</code>
|
||||
*/
|
||||
boolean hasExpiryTime();
|
||||
/**
|
||||
* <pre>
|
||||
* The UNIX time when the leaderboard record expires.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Timestamp expiry_time = 10;</code>
|
||||
*/
|
||||
com.google.protobuf.Timestamp getExpiryTime();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The rank of this record.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional int64 rank = 11;</code>
|
||||
*/
|
||||
long getRank();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The maximum number of score updates allowed by the owner.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional uint32 max_num_score = 12;</code>
|
||||
*/
|
||||
int getMaxNumScore();
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Leave a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.LeaveGroupRequest}
|
||||
*/
|
||||
public final class LeaveGroupRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
LeaveGroupRequest, LeaveGroupRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.LeaveGroupRequest)
|
||||
LeaveGroupRequestOrBuilder {
|
||||
private LeaveGroupRequest() {
|
||||
groupId_ = "";
|
||||
}
|
||||
public static final int GROUP_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String groupId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return groupId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(groupId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
groupId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void clearGroupId() {
|
||||
|
||||
groupId_ = getDefaultInstance().getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
groupId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!groupId_.isEmpty()) {
|
||||
output.writeString(1, getGroupId());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!groupId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getGroupId());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.LeaveGroupRequest 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.LeaveGroupRequest 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.LeaveGroupRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.LeaveGroupRequest 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.LeaveGroupRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.LeaveGroupRequest 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.LeaveGroupRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.LeaveGroupRequest 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.LeaveGroupRequest 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.LeaveGroupRequest 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.LeaveGroupRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Leave a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.LeaveGroupRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.LeaveGroupRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.LeaveGroupRequest)
|
||||
com.heroiclabs.nakama.api.LeaveGroupRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.LeaveGroupRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return instance.getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return instance.getGroupIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder clearGroupId() {
|
||||
copyOnWrite();
|
||||
instance.clearGroupId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.LeaveGroupRequest)
|
||||
}
|
||||
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.LeaveGroupRequest();
|
||||
}
|
||||
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.LeaveGroupRequest other = (com.heroiclabs.nakama.api.LeaveGroupRequest) arg1;
|
||||
groupId_ = visitor.visitString(!groupId_.isEmpty(), groupId_,
|
||||
!other.groupId_.isEmpty(), other.groupId_);
|
||||
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();
|
||||
|
||||
groupId_ = 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.LeaveGroupRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.LeaveGroupRequest)
|
||||
private static final com.heroiclabs.nakama.api.LeaveGroupRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new LeaveGroupRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.LeaveGroupRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<LeaveGroupRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<LeaveGroupRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface LeaveGroupRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.LeaveGroupRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getGroupId();
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to leave.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getGroupIdBytes();
|
||||
}
|
||||
+541
@@ -0,0 +1,541 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Link Facebook to the current user's account.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.LinkFacebookRequest}
|
||||
*/
|
||||
public final class LinkFacebookRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
LinkFacebookRequest, LinkFacebookRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.LinkFacebookRequest)
|
||||
LinkFacebookRequestOrBuilder {
|
||||
private LinkFacebookRequest() {
|
||||
}
|
||||
public static final int ACCOUNT_FIELD_NUMBER = 1;
|
||||
private com.heroiclabs.nakama.api.AccountFacebook account_;
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return account_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountFacebook getAccount() {
|
||||
return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void setAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
account_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void setAccount(
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) {
|
||||
account_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
if (account_ != null &&
|
||||
account_ != com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) {
|
||||
account_ =
|
||||
com.heroiclabs.nakama.api.AccountFacebook.newBuilder(account_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
account_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
private void clearAccount() { account_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int SYNC_FIELD_NUMBER = 4;
|
||||
private com.google.protobuf.BoolValue sync_;
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public boolean hasSync() {
|
||||
return sync_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getSync() {
|
||||
return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void setSync(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
sync_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void setSync(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
sync_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void mergeSync(com.google.protobuf.BoolValue value) {
|
||||
if (sync_ != null &&
|
||||
sync_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
sync_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(sync_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
sync_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
private void clearSync() { sync_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (account_ != null) {
|
||||
output.writeMessage(1, getAccount());
|
||||
}
|
||||
if (sync_ != null) {
|
||||
output.writeMessage(4, getSync());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (account_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getAccount());
|
||||
}
|
||||
if (sync_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(4, getSync());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.LinkFacebookRequest 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.LinkFacebookRequest 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.LinkFacebookRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.LinkFacebookRequest 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.LinkFacebookRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.LinkFacebookRequest 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.LinkFacebookRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.LinkFacebookRequest 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.LinkFacebookRequest 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.LinkFacebookRequest 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.LinkFacebookRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Link Facebook to the current user's account.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.LinkFacebookRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.LinkFacebookRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.LinkFacebookRequest)
|
||||
com.heroiclabs.nakama.api.LinkFacebookRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.LinkFacebookRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public boolean hasAccount() {
|
||||
return instance.hasAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public com.heroiclabs.nakama.api.AccountFacebook getAccount() {
|
||||
return instance.getAccount();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder setAccount(
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setAccount(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) {
|
||||
copyOnWrite();
|
||||
instance.mergeAccount(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
public Builder clearAccount() { copyOnWrite();
|
||||
instance.clearAccount();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public boolean hasSync() {
|
||||
return instance.hasSync();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getSync() {
|
||||
return instance.getSync();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder setSync(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setSync(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder setSync(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setSync(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder mergeSync(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeSync(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
public Builder clearSync() { copyOnWrite();
|
||||
instance.clearSync();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.LinkFacebookRequest)
|
||||
}
|
||||
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.LinkFacebookRequest();
|
||||
}
|
||||
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.LinkFacebookRequest other = (com.heroiclabs.nakama.api.LinkFacebookRequest) arg1;
|
||||
account_ = visitor.visitMessage(account_, other.account_);
|
||||
sync_ = visitor.visitMessage(sync_, other.sync_);
|
||||
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: {
|
||||
com.heroiclabs.nakama.api.AccountFacebook.Builder subBuilder = null;
|
||||
if (account_ != null) {
|
||||
subBuilder = account_.toBuilder();
|
||||
}
|
||||
account_ = input.readMessage(com.heroiclabs.nakama.api.AccountFacebook.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(account_);
|
||||
account_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (sync_ != null) {
|
||||
subBuilder = sync_.toBuilder();
|
||||
}
|
||||
sync_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(sync_);
|
||||
sync_ = 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.LinkFacebookRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.LinkFacebookRequest)
|
||||
private static final com.heroiclabs.nakama.api.LinkFacebookRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new LinkFacebookRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.LinkFacebookRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<LinkFacebookRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<LinkFacebookRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface LinkFacebookRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.LinkFacebookRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
boolean hasAccount();
|
||||
/**
|
||||
* <pre>
|
||||
* The Facebook account details.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .nakama.api.AccountFacebook account = 1;</code>
|
||||
*/
|
||||
com.heroiclabs.nakama.api.AccountFacebook getAccount();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
boolean hasSync();
|
||||
/**
|
||||
* <pre>
|
||||
* Import Facebook friends for the user.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue sync = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getSync();
|
||||
}
|
||||
+825
@@ -0,0 +1,825 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List a channel's message history.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListChannelMessagesRequest}
|
||||
*/
|
||||
public final class ListChannelMessagesRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ListChannelMessagesRequest, ListChannelMessagesRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ListChannelMessagesRequest)
|
||||
ListChannelMessagesRequestOrBuilder {
|
||||
private ListChannelMessagesRequest() {
|
||||
channelId_ = "";
|
||||
cursor_ = "";
|
||||
}
|
||||
public static final int CHANNEL_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String channelId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getChannelId() {
|
||||
return channelId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getChannelIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(channelId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
private void setChannelId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
channelId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
private void clearChannelId() {
|
||||
|
||||
channelId_ = getDefaultInstance().getChannelId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
private void setChannelIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
channelId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int LIMIT_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Int32Value limit_;
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value 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.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(com.google.protobuf.Int32Value 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.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
limit_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
if (limit_ != null &&
|
||||
limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) {
|
||||
limit_ =
|
||||
com.google.protobuf.Int32Value.newBuilder(limit_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
limit_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void clearLimit() { limit_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int FORWARD_FIELD_NUMBER = 3;
|
||||
private com.google.protobuf.BoolValue forward_;
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public boolean hasForward() {
|
||||
return forward_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getForward() {
|
||||
return forward_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : forward_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
private void setForward(com.google.protobuf.BoolValue value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
forward_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
private void setForward(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
forward_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
private void mergeForward(com.google.protobuf.BoolValue value) {
|
||||
if (forward_ != null &&
|
||||
forward_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
|
||||
forward_ =
|
||||
com.google.protobuf.BoolValue.newBuilder(forward_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
forward_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
private void clearForward() { forward_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CURSOR_FIELD_NUMBER = 4;
|
||||
private java.lang.String cursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return cursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(cursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
private void setCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
cursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
private void clearCursor() {
|
||||
|
||||
cursor_ = getDefaultInstance().getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</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 {
|
||||
if (!channelId_.isEmpty()) {
|
||||
output.writeString(1, getChannelId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
output.writeMessage(2, getLimit());
|
||||
}
|
||||
if (forward_ != null) {
|
||||
output.writeMessage(3, getForward());
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
output.writeString(4, getCursor());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!channelId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getChannelId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getLimit());
|
||||
}
|
||||
if (forward_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(3, getForward());
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(4, getCursor());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListChannelMessagesRequest 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.ListChannelMessagesRequest 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.ListChannelMessagesRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListChannelMessagesRequest 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.ListChannelMessagesRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListChannelMessagesRequest 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.ListChannelMessagesRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListChannelMessagesRequest 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.ListChannelMessagesRequest 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.ListChannelMessagesRequest 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.ListChannelMessagesRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List a channel's message history.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListChannelMessagesRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ListChannelMessagesRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ListChannelMessagesRequest)
|
||||
com.heroiclabs.nakama.api.ListChannelMessagesRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ListChannelMessagesRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getChannelId() {
|
||||
return instance.getChannelId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getChannelIdBytes() {
|
||||
return instance.getChannelIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
public Builder setChannelId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setChannelId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
public Builder clearChannelId() {
|
||||
copyOnWrite();
|
||||
instance.clearChannelId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
public Builder setChannelIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setChannelIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value 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.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return instance.getLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder clearLimit() { copyOnWrite();
|
||||
instance.clearLimit();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public boolean hasForward() {
|
||||
return instance.hasForward();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.BoolValue getForward() {
|
||||
return instance.getForward();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public Builder setForward(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.setForward(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public Builder setForward(
|
||||
com.google.protobuf.BoolValue.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setForward(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public Builder mergeForward(com.google.protobuf.BoolValue value) {
|
||||
copyOnWrite();
|
||||
instance.mergeForward(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
public Builder clearForward() { copyOnWrite();
|
||||
instance.clearForward();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return instance.getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return instance.getCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public Builder setCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public Builder clearCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public Builder setCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setCursorBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ListChannelMessagesRequest)
|
||||
}
|
||||
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.ListChannelMessagesRequest();
|
||||
}
|
||||
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.ListChannelMessagesRequest other = (com.heroiclabs.nakama.api.ListChannelMessagesRequest) arg1;
|
||||
channelId_ = visitor.visitString(!channelId_.isEmpty(), channelId_,
|
||||
!other.channelId_.isEmpty(), other.channelId_);
|
||||
limit_ = visitor.visitMessage(limit_, other.limit_);
|
||||
forward_ = visitor.visitMessage(forward_, other.forward_);
|
||||
cursor_ = visitor.visitString(!cursor_.isEmpty(), cursor_,
|
||||
!other.cursor_.isEmpty(), other.cursor_);
|
||||
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();
|
||||
|
||||
channelId_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.Int32Value.Builder subBuilder = null;
|
||||
if (limit_ != null) {
|
||||
subBuilder = limit_.toBuilder();
|
||||
}
|
||||
limit_ = input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(limit_);
|
||||
limit_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
com.google.protobuf.BoolValue.Builder subBuilder = null;
|
||||
if (forward_ != null) {
|
||||
subBuilder = forward_.toBuilder();
|
||||
}
|
||||
forward_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(forward_);
|
||||
forward_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
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.ListChannelMessagesRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ListChannelMessagesRequest)
|
||||
private static final com.heroiclabs.nakama.api.ListChannelMessagesRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ListChannelMessagesRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListChannelMessagesRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ListChannelMessagesRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ListChannelMessagesRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListChannelMessagesRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListChannelMessagesRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getChannelId();
|
||||
/**
|
||||
* <pre>
|
||||
* The channel ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string channel_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getChannelIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getLimit();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
boolean hasForward();
|
||||
/**
|
||||
* <pre>
|
||||
* True if listing should be older messages to newer, false if reverse.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue forward = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getForward();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* A pagination cursor, if any.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
}
|
||||
+825
@@ -0,0 +1,825 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List all users that are part of a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListGroupUsersRequest}
|
||||
*/
|
||||
public final class ListGroupUsersRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ListGroupUsersRequest, ListGroupUsersRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ListGroupUsersRequest)
|
||||
ListGroupUsersRequestOrBuilder {
|
||||
private ListGroupUsersRequest() {
|
||||
groupId_ = "";
|
||||
cursor_ = "";
|
||||
}
|
||||
public static final int GROUP_ID_FIELD_NUMBER = 1;
|
||||
private java.lang.String groupId_;
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return groupId_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(groupId_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupId(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
groupId_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void clearGroupId() {
|
||||
|
||||
groupId_ = getDefaultInstance().getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
private void setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
groupId_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int LIMIT_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.Int32Value limit_;
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value 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.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(com.google.protobuf.Int32Value 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.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
limit_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
if (limit_ != null &&
|
||||
limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) {
|
||||
limit_ =
|
||||
com.google.protobuf.Int32Value.newBuilder(limit_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
limit_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
private void clearLimit() { limit_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int STATE_FIELD_NUMBER = 3;
|
||||
private com.google.protobuf.Int32Value state_;
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public boolean hasState() {
|
||||
return state_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getState() {
|
||||
return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
private void setState(com.google.protobuf.Int32Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
state_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
private void setState(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
state_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
private void mergeState(com.google.protobuf.Int32Value value) {
|
||||
if (state_ != null &&
|
||||
state_ != com.google.protobuf.Int32Value.getDefaultInstance()) {
|
||||
state_ =
|
||||
com.google.protobuf.Int32Value.newBuilder(state_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
state_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
private void clearState() { state_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CURSOR_FIELD_NUMBER = 4;
|
||||
private java.lang.String cursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return cursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(cursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
private void setCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
cursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
private void clearCursor() {
|
||||
|
||||
cursor_ = getDefaultInstance().getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</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 {
|
||||
if (!groupId_.isEmpty()) {
|
||||
output.writeString(1, getGroupId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
output.writeMessage(2, getLimit());
|
||||
}
|
||||
if (state_ != null) {
|
||||
output.writeMessage(3, getState());
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
output.writeString(4, getCursor());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!groupId_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getGroupId());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, getLimit());
|
||||
}
|
||||
if (state_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(3, getState());
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(4, getCursor());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListGroupUsersRequest 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.ListGroupUsersRequest 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.ListGroupUsersRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListGroupUsersRequest 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.ListGroupUsersRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListGroupUsersRequest 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.ListGroupUsersRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListGroupUsersRequest 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.ListGroupUsersRequest 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.ListGroupUsersRequest 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.ListGroupUsersRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List all users that are part of a group.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListGroupUsersRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ListGroupUsersRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ListGroupUsersRequest)
|
||||
com.heroiclabs.nakama.api.ListGroupUsersRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ListGroupUsersRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public java.lang.String getGroupId() {
|
||||
return instance.getGroupId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getGroupIdBytes() {
|
||||
return instance.getGroupIdBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupId(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupId(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder clearGroupId() {
|
||||
copyOnWrite();
|
||||
instance.clearGroupId();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
public Builder setGroupIdBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setGroupIdBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value 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.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return instance.getLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
public Builder clearLimit() { copyOnWrite();
|
||||
instance.clearLimit();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public boolean hasState() {
|
||||
return instance.hasState();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getState() {
|
||||
return instance.getState();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public Builder setState(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setState(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public Builder setState(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setState(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public Builder mergeState(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeState(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
public Builder clearState() { copyOnWrite();
|
||||
instance.clearState();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return instance.getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return instance.getCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public Builder setCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public Builder clearCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
public Builder setCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setCursorBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ListGroupUsersRequest)
|
||||
}
|
||||
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.ListGroupUsersRequest();
|
||||
}
|
||||
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.ListGroupUsersRequest other = (com.heroiclabs.nakama.api.ListGroupUsersRequest) arg1;
|
||||
groupId_ = visitor.visitString(!groupId_.isEmpty(), groupId_,
|
||||
!other.groupId_.isEmpty(), other.groupId_);
|
||||
limit_ = visitor.visitMessage(limit_, other.limit_);
|
||||
state_ = visitor.visitMessage(state_, other.state_);
|
||||
cursor_ = visitor.visitString(!cursor_.isEmpty(), cursor_,
|
||||
!other.cursor_.isEmpty(), other.cursor_);
|
||||
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();
|
||||
|
||||
groupId_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
com.google.protobuf.Int32Value.Builder subBuilder = null;
|
||||
if (limit_ != null) {
|
||||
subBuilder = limit_.toBuilder();
|
||||
}
|
||||
limit_ = input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(limit_);
|
||||
limit_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
com.google.protobuf.Int32Value.Builder subBuilder = null;
|
||||
if (state_ != null) {
|
||||
subBuilder = state_.toBuilder();
|
||||
}
|
||||
state_ = input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(state_);
|
||||
state_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
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.ListGroupUsersRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ListGroupUsersRequest)
|
||||
private static final com.heroiclabs.nakama.api.ListGroupUsersRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ListGroupUsersRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListGroupUsersRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ListGroupUsersRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ListGroupUsersRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListGroupUsersRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListGroupUsersRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getGroupId();
|
||||
/**
|
||||
* <pre>
|
||||
* The group ID to list from.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string group_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getGroupIdBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of records to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getLimit();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
boolean hasState();
|
||||
/**
|
||||
* <pre>
|
||||
* The group user state to list.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value state = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getState();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* An optional next page cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
}
|
||||
+659
@@ -0,0 +1,659 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List groups based on given filters.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListGroupsRequest}
|
||||
*/
|
||||
public final class ListGroupsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ListGroupsRequest, ListGroupsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ListGroupsRequest)
|
||||
ListGroupsRequestOrBuilder {
|
||||
private ListGroupsRequest() {
|
||||
name_ = "";
|
||||
cursor_ = "";
|
||||
}
|
||||
public static final int NAME_FIELD_NUMBER = 1;
|
||||
private java.lang.String name_;
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
return name_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(name_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
private void setName(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
name_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
private void clearName() {
|
||||
|
||||
name_ = getDefaultInstance().getName();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
private void setNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
name_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public static final int CURSOR_FIELD_NUMBER = 2;
|
||||
private java.lang.String cursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return cursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(cursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
private void setCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
cursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
private void clearCursor() {
|
||||
|
||||
cursor_ = getDefaultInstance().getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </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 static final int LIMIT_FIELD_NUMBER = 3;
|
||||
private com.google.protobuf.Int32Value limit_;
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return limit_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
private void setLimit(com.google.protobuf.Int32Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
limit_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
private void setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
limit_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
private void mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
if (limit_ != null &&
|
||||
limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) {
|
||||
limit_ =
|
||||
com.google.protobuf.Int32Value.newBuilder(limit_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
limit_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
private void clearLimit() { limit_ = null;
|
||||
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!name_.isEmpty()) {
|
||||
output.writeString(1, getName());
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
output.writeString(2, getCursor());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
output.writeMessage(3, getLimit());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!name_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(1, getName());
|
||||
}
|
||||
if (!cursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getCursor());
|
||||
}
|
||||
if (limit_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(3, getLimit());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListGroupsRequest 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.ListGroupsRequest 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.ListGroupsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListGroupsRequest 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.ListGroupsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListGroupsRequest 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.ListGroupsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListGroupsRequest 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.ListGroupsRequest 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.ListGroupsRequest 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.ListGroupsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List groups based on given filters.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListGroupsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ListGroupsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ListGroupsRequest)
|
||||
com.heroiclabs.nakama.api.ListGroupsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ListGroupsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
return instance.getName();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
return instance.getNameBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder setName(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setName(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder clearName() {
|
||||
copyOnWrite();
|
||||
instance.clearName();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
public Builder setNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setNameBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCursor() {
|
||||
return instance.getCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCursorBytes() {
|
||||
return instance.getCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder setCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder clearCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
public Builder setCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setCursorBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return instance.hasLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return instance.getLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public Builder setLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public Builder setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public Builder mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
public Builder clearLimit() { copyOnWrite();
|
||||
instance.clearLimit();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ListGroupsRequest)
|
||||
}
|
||||
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.ListGroupsRequest();
|
||||
}
|
||||
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.ListGroupsRequest other = (com.heroiclabs.nakama.api.ListGroupsRequest) arg1;
|
||||
name_ = visitor.visitString(!name_.isEmpty(), name_,
|
||||
!other.name_.isEmpty(), other.name_);
|
||||
cursor_ = visitor.visitString(!cursor_.isEmpty(), cursor_,
|
||||
!other.cursor_.isEmpty(), other.cursor_);
|
||||
limit_ = visitor.visitMessage(limit_, other.limit_);
|
||||
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();
|
||||
|
||||
name_ = s;
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
cursor_ = s;
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
com.google.protobuf.Int32Value.Builder subBuilder = null;
|
||||
if (limit_ != null) {
|
||||
subBuilder = limit_.toBuilder();
|
||||
}
|
||||
limit_ = input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(limit_);
|
||||
limit_ = 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.ListGroupsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ListGroupsRequest)
|
||||
private static final com.heroiclabs.nakama.api.ListGroupsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ListGroupsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListGroupsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ListGroupsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ListGroupsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListGroupsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListGroupsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
java.lang.String getName();
|
||||
/**
|
||||
* <pre>
|
||||
* List groups that contain this value in their names.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string name = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNameBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
java.lang.String getCursor();
|
||||
/**
|
||||
* <pre>
|
||||
* Optional pagination cursor.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cursor = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getCursorBytes();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Max number of groups to return. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getLimit();
|
||||
}
|
||||
+825
@@ -0,0 +1,825 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/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-common/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();
|
||||
}
|
||||
+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-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListLeaderboardRecordsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListLeaderboardRecordsRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the leaderboard to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
java.lang.String getLeaderboardId();
|
||||
/**
|
||||
* <pre>
|
||||
* The ID of the leaderboard to list for.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string leaderboard_id = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getLeaderboardIdBytes();
|
||||
|
||||
/**
|
||||
* <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. 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();
|
||||
}
|
||||
+1205
File diff suppressed because it is too large.
Load diff
+111
@@ -0,0 +1,111 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
public interface ListMatchesRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:nakama.api.ListMatchesRequest)
|
||||
com.google.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Limit the number of returned matches.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
boolean hasLimit();
|
||||
/**
|
||||
* <pre>
|
||||
* Limit the number of returned matches.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getLimit();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Authoritative or relayed matches.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue authoritative = 2;</code>
|
||||
*/
|
||||
boolean hasAuthoritative();
|
||||
/**
|
||||
* <pre>
|
||||
* Authoritative or relayed matches.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.BoolValue authoritative = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.BoolValue getAuthoritative();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Label filter.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.StringValue label = 3;</code>
|
||||
*/
|
||||
boolean hasLabel();
|
||||
/**
|
||||
* <pre>
|
||||
* Label filter.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.StringValue label = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.StringValue getLabel();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Minimum user count.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value min_size = 4;</code>
|
||||
*/
|
||||
boolean hasMinSize();
|
||||
/**
|
||||
* <pre>
|
||||
* Minimum user count.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value min_size = 4;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getMinSize();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum user count.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value max_size = 5;</code>
|
||||
*/
|
||||
boolean hasMaxSize();
|
||||
/**
|
||||
* <pre>
|
||||
* Maximum user count.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value max_size = 5;</code>
|
||||
*/
|
||||
com.google.protobuf.Int32Value getMaxSize();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Arbitrary label query.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.StringValue query = 6;</code>
|
||||
*/
|
||||
boolean hasQuery();
|
||||
/**
|
||||
* <pre>
|
||||
* Arbitrary label query.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.StringValue query = 6;</code>
|
||||
*/
|
||||
com.google.protobuf.StringValue getQuery();
|
||||
}
|
||||
+517
@@ -0,0 +1,517 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: github.com/heroiclabs/nakama-common/api/api.proto
|
||||
|
||||
package com.heroiclabs.nakama.api;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Get a list of unexpired notifications.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListNotificationsRequest}
|
||||
*/
|
||||
public final class ListNotificationsRequest extends
|
||||
com.google.protobuf.GeneratedMessageLite<
|
||||
ListNotificationsRequest, ListNotificationsRequest.Builder> implements
|
||||
// @@protoc_insertion_point(message_implements:nakama.api.ListNotificationsRequest)
|
||||
ListNotificationsRequestOrBuilder {
|
||||
private ListNotificationsRequest() {
|
||||
cacheableCursor_ = "";
|
||||
}
|
||||
public static final int LIMIT_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Int32Value limit_;
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return limit_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
private void setLimit(com.google.protobuf.Int32Value value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
limit_ = value;
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
private void setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
limit_ = builderForValue.build();
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
private void mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
if (limit_ != null &&
|
||||
limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) {
|
||||
limit_ =
|
||||
com.google.protobuf.Int32Value.newBuilder(limit_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
limit_ = value;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
private void clearLimit() { limit_ = null;
|
||||
|
||||
}
|
||||
|
||||
public static final int CACHEABLE_CURSOR_FIELD_NUMBER = 2;
|
||||
private java.lang.String cacheableCursor_;
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCacheableCursor() {
|
||||
return cacheableCursor_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCacheableCursorBytes() {
|
||||
return com.google.protobuf.ByteString.copyFromUtf8(cacheableCursor_);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
private void setCacheableCursor(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
cacheableCursor_ = value;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
private void clearCacheableCursor() {
|
||||
|
||||
cacheableCursor_ = getDefaultInstance().getCacheableCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
private void setCacheableCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
cacheableCursor_ = value.toStringUtf8();
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (limit_ != null) {
|
||||
output.writeMessage(1, getLimit());
|
||||
}
|
||||
if (!cacheableCursor_.isEmpty()) {
|
||||
output.writeString(2, getCacheableCursor());
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (limit_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getLimit());
|
||||
}
|
||||
if (!cacheableCursor_.isEmpty()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeStringSize(2, getCacheableCursor());
|
||||
}
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListNotificationsRequest 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.ListNotificationsRequest 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.ListNotificationsRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, data);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListNotificationsRequest 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.ListNotificationsRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageLite.parseFrom(
|
||||
DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListNotificationsRequest 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.ListNotificationsRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
|
||||
}
|
||||
public static com.heroiclabs.nakama.api.ListNotificationsRequest 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.ListNotificationsRequest 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.ListNotificationsRequest 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.ListNotificationsRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Get a list of unexpired notifications.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code nakama.api.ListNotificationsRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageLite.Builder<
|
||||
com.heroiclabs.nakama.api.ListNotificationsRequest, Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:nakama.api.ListNotificationsRequest)
|
||||
com.heroiclabs.nakama.api.ListNotificationsRequestOrBuilder {
|
||||
// Construct using com.heroiclabs.nakama.api.ListNotificationsRequest.newBuilder()
|
||||
private Builder() {
|
||||
super(DEFAULT_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public boolean hasLimit() {
|
||||
return instance.hasLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.Int32Value getLimit() {
|
||||
return instance.getLimit();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public Builder setLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public Builder setLimit(
|
||||
com.google.protobuf.Int32Value.Builder builderForValue) {
|
||||
copyOnWrite();
|
||||
instance.setLimit(builderForValue);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public Builder mergeLimit(com.google.protobuf.Int32Value value) {
|
||||
copyOnWrite();
|
||||
instance.mergeLimit(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The number of notifications to get. Between 1 and 100.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional .google.protobuf.Int32Value limit = 1;</code>
|
||||
*/
|
||||
public Builder clearLimit() { copyOnWrite();
|
||||
instance.clearLimit();
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
public java.lang.String getCacheableCursor() {
|
||||
return instance.getCacheableCursor();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getCacheableCursorBytes() {
|
||||
return instance.getCacheableCursorBytes();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
public Builder setCacheableCursor(
|
||||
java.lang.String value) {
|
||||
copyOnWrite();
|
||||
instance.setCacheableCursor(value);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
public Builder clearCacheableCursor() {
|
||||
copyOnWrite();
|
||||
instance.clearCacheableCursor();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* A cursor to page through notifications. May be cached by clients to get from point in time forwards.
|
||||
* </pre>
|
||||
*
|
||||
* <code>optional string cacheable_cursor = 2;</code>
|
||||
*/
|
||||
public Builder setCacheableCursorBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
copyOnWrite();
|
||||
instance.setCacheableCursorBytes(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:nakama.api.ListNotificationsRequest)
|
||||
}
|
||||
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.ListNotificationsRequest();
|
||||
}
|
||||
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.ListNotificationsRequest other = (com.heroiclabs.nakama.api.ListNotificationsRequest) arg1;
|
||||
limit_ = visitor.visitMessage(limit_, other.limit_);
|
||||
cacheableCursor_ = visitor.visitString(!cacheableCursor_.isEmpty(), cacheableCursor_,
|
||||
!other.cacheableCursor_.isEmpty(), other.cacheableCursor_);
|
||||
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: {
|
||||
com.google.protobuf.Int32Value.Builder subBuilder = null;
|
||||
if (limit_ != null) {
|
||||
subBuilder = limit_.toBuilder();
|
||||
}
|
||||
limit_ = input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(limit_);
|
||||
limit_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
String s = input.readStringRequireUtf8();
|
||||
|
||||
cacheableCursor_ = 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.ListNotificationsRequest.class) {
|
||||
if (PARSER == null) {
|
||||
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PARSER;
|
||||
}
|
||||
}
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(class_scope:nakama.api.ListNotificationsRequest)
|
||||
private static final com.heroiclabs.nakama.api.ListNotificationsRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new ListNotificationsRequest();
|
||||
DEFAULT_INSTANCE.makeImmutable();
|
||||
}
|
||||
|
||||
public static com.heroiclabs.nakama.api.ListNotificationsRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static volatile com.google.protobuf.Parser<ListNotificationsRequest> PARSER;
|
||||
|
||||
public static com.google.protobuf.Parser<ListNotificationsRequest> parser() {
|
||||
return DEFAULT_INSTANCE.getParserForType();
|
||||
}
|
||||
}
|
||||
|
||||
Loaded 100 of 336 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user