Compare commits

...
5 Commits
Author SHA1 Message Date
Mo Firouz eb55222866 Nakama Java 2.5.2 release. 2024-10-27 10:26:26 +00:00
Mo Firouz afc257b7b6 Add overloaded methods for async disconnect methods. (#83)
* Add overloaded methods for async disconnect methods.

* Keep socket reference until OnClose is invoked

* Correct session logout. Shutdown executor correctly.

* WebSocket client resources are released immediately after disconnection and are made ready again in case of reconnection.
2024-10-27 10:25:08 +00:00
Mo Firouz 08ea9e4666 Nakama Java 2.5.1 release. 2024-10-16 11:41:53 +01:00
Mo Firouz c79783367a Include generated Protobuf code in the repository to allow CI tools to build the codebase without Buf tooling. 2024-10-16 11:41:10 +01:00
Mo Firouz d01dae3916 Update build file to include files in the shadowJar correctly. 2024-10-14 11:51:48 +01:00
442 changed files with 288043 additions and 39 deletions

No files matched your search

+1 -8
View File
@@ -1,16 +1,9 @@
# Created by https://www.gitignore.io/api/git,java,macos,linux,gradle,eclipse,windows,sublimetext,intellij+all,intellij+iml
**/build
## Downloaded code by the shell script
**/proto
## Generated Java code by Buf
**/src/main/java/com/google/
**/src/main/java/com/grpc/
**/src/main/java/com/heroiclabs/nakama/api/
**/src/main/java/com/heroiclabs/nakama/rtapi/
**/src/main/java/com/heroiclabs/satori/api/
**/build
### Custom ###
.BINTRAY
+16
View File
@@ -4,6 +4,22 @@ 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/).
## [2.5.2] - 2024-10-27
### Changed
- WebSocketClient now closes the thread executor service if internal executor was used once the socket is closed.
- Improve client and socket disconnection process.
### Fixed
- Corrected Channel Type enum values to match the protocol.
- Session logout function no longer attempts to renew the token after logout.
- WebSocket client resources are released immediately after disconnection and are made ready again in case of reconnection.
## [2.5.1] - 2024-10-16
### Changed
- Include generated Protobuf code in the repository to allow CI tools to build the codebase without Buf tooling.
## [2.5.0] - 2024-10-14
### Added
+3 -1
View File
@@ -42,7 +42,7 @@ lombok {
}
group = 'com.github.heroiclabs'
version = '2.5.0'
version = '2.5.2'
sourceCompatibility = 1.8
targetCompatibility = 1.8
@@ -219,6 +219,7 @@ task nakamaShadowJar(type: ShadowJar) {
configurations = [project.configurations.sharedImplementation,
project.configurations.sharedApi]
from sourceSets.main.output
exclude 'com/heroiclabs/satori'
archiveFileName.set("nakama-java-${version}-all.jar")
}
@@ -229,6 +230,7 @@ task satoriShadowJar(type: ShadowJar) {
configurations = [project.configurations.sharedImplementation,
project.configurations.sharedApi]
from sourceSets.main.output
exclude 'com/heroiclabs/nakama'
archiveFileName.set("satori-java-${version}-all.jar")
}
@@ -0,0 +1,77 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/annotations.proto
// Protobuf Java Version: 4.28.2
package com.google.api;
public final class AnnotationsProto {
private AnnotationsProto() {}
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AnnotationsProto.class.getName());
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
registry.add(com.google.api.AnnotationsProto.http);
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public static final int HTTP_FIELD_NUMBER = 72295728;
/**
* <pre>
* See `HttpRule`.
* </pre>
*
* <code>extend .google.protobuf.MethodOptions { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.protobuf.DescriptorProtos.MethodOptions,
com.google.api.HttpRule> http = com.google.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
com.google.api.HttpRule.class,
com.google.api.HttpRule.getDefaultInstance());
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\034google/api/annotations.proto\022\ngoogle.a" +
"pi\032\025google/api/http.proto\032 google/protob" +
"uf/descriptor.proto:K\n\004http\022\036.google.pro" +
"tobuf.MethodOptions\030\260\312\274\" \001(\0132\024.google.ap" +
"i.HttpRuleR\004httpB\256\001\n\016com.google.apiB\020Ann" +
"otationsProtoP\001ZAgoogle.golang.org/genpr" +
"oto/googleapis/api/annotations;annotatio" +
"ns\242\002\003GAX\252\002\nGoogle.Api\312\002\nGoogle\\Api\342\002\026Goo" +
"gle\\Api\\GPBMetadata\352\002\013Google::Apib\006proto" +
"3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.HttpProto.getDescriptor(),
com.google.protobuf.DescriptorProtos.getDescriptor(),
});
http.internalInit(descriptor.getExtensions().get(0));
descriptor.resolveAllFeaturesImmutable();
com.google.api.HttpProto.getDescriptor();
com.google.protobuf.DescriptorProtos.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
@@ -0,0 +1,701 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/http.proto
// Protobuf Java Version: 4.28.2
package com.google.api;
/**
* <pre>
* A custom pattern is used for defining custom HTTP verb.
* </pre>
*
* Protobuf type {@code google.api.CustomHttpPattern}
*/
public final class CustomHttpPattern extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:google.api.CustomHttpPattern)
CustomHttpPatternOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
CustomHttpPattern.class.getName());
}
// Use CustomHttpPattern.newBuilder() to construct.
private CustomHttpPattern(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private CustomHttpPattern() {
kind_ = "";
path_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class);
}
public static final int KIND_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object kind_ = "";
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @return The kind.
*/
@java.lang.Override
public java.lang.String getKind() {
java.lang.Object ref = kind_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kind_ = s;
return s;
}
}
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @return The bytes for kind.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PATH_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object path_ = "";
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @return The path.
*/
@java.lang.Override
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @return The bytes for path.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, kind_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, path_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kind_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, path_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.api.CustomHttpPattern)) {
return super.equals(obj);
}
com.google.api.CustomHttpPattern other = (com.google.api.CustomHttpPattern) obj;
if (!getKind()
.equals(other.getKind())) return false;
if (!getPath()
.equals(other.getPath())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KIND_FIELD_NUMBER;
hash = (53 * hash) + getKind().hashCode();
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.CustomHttpPattern parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.CustomHttpPattern parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.CustomHttpPattern parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.CustomHttpPattern parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.CustomHttpPattern parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.CustomHttpPattern parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.CustomHttpPattern parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.CustomHttpPattern parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.CustomHttpPattern parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.CustomHttpPattern parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.CustomHttpPattern parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.CustomHttpPattern prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* A custom pattern is used for defining custom HTTP verb.
* </pre>
*
* Protobuf type {@code google.api.CustomHttpPattern}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:google.api.CustomHttpPattern)
com.google.api.CustomHttpPatternOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class);
}
// Construct using com.google.api.CustomHttpPattern.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
kind_ = "";
path_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor;
}
@java.lang.Override
public com.google.api.CustomHttpPattern getDefaultInstanceForType() {
return com.google.api.CustomHttpPattern.getDefaultInstance();
}
@java.lang.Override
public com.google.api.CustomHttpPattern build() {
com.google.api.CustomHttpPattern result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.CustomHttpPattern buildPartial() {
com.google.api.CustomHttpPattern result = new com.google.api.CustomHttpPattern(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.api.CustomHttpPattern result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.kind_ = kind_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.path_ = path_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.CustomHttpPattern) {
return mergeFrom((com.google.api.CustomHttpPattern)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.CustomHttpPattern other) {
if (other == com.google.api.CustomHttpPattern.getDefaultInstance()) return this;
if (!other.getKind().isEmpty()) {
kind_ = other.kind_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getPath().isEmpty()) {
path_ = other.path_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
kind_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
path_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object kind_ = "";
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @return The kind.
*/
public java.lang.String getKind() {
java.lang.Object ref = kind_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kind_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @return The bytes for kind.
*/
public com.google.protobuf.ByteString
getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @param value The kind to set.
* @return This builder for chaining.
*/
public Builder setKind(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
kind_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @return This builder for chaining.
*/
public Builder clearKind() {
kind_ = getDefaultInstance().getKind();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @param value The bytes for kind to set.
* @return This builder for chaining.
*/
public Builder setKindBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
kind_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object path_ = "";
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @return The path.
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @return The bytes for path.
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @param value The path to set.
* @return This builder for chaining.
*/
public Builder setPath(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
path_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @return This builder for chaining.
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @param value The bytes for path to set.
* @return This builder for chaining.
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
path_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:google.api.CustomHttpPattern)
}
// @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern)
private static final com.google.api.CustomHttpPattern DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.CustomHttpPattern();
}
public static com.google.api.CustomHttpPattern getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<CustomHttpPattern>
PARSER = new com.google.protobuf.AbstractParser<CustomHttpPattern>() {
@java.lang.Override
public CustomHttpPattern parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<CustomHttpPattern> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<CustomHttpPattern> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.api.CustomHttpPattern getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,51 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/http.proto
// Protobuf Java Version: 4.28.2
package com.google.api;
public interface CustomHttpPatternOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.CustomHttpPattern)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @return The kind.
*/
java.lang.String getKind();
/**
* <pre>
* The name of this custom HTTP verb.
* </pre>
*
* <code>string kind = 1 [json_name = "kind"];</code>
* @return The bytes for kind.
*/
com.google.protobuf.ByteString
getKindBytes();
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @return The path.
*/
java.lang.String getPath();
/**
* <pre>
* The path matched by this custom verb.
* </pre>
*
* <code>string path = 2 [json_name = "path"];</code>
* @return The bytes for path.
*/
com.google.protobuf.ByteString
getPathBytes();
}
+972
View File
@@ -0,0 +1,972 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/http.proto
// Protobuf Java Version: 4.28.2
package com.google.api;
/**
* <pre>
* Defines the HTTP configuration for an API service. It contains a list of
* [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
* to one or more HTTP REST API methods.
* </pre>
*
* Protobuf type {@code google.api.Http}
*/
public final class Http extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:google.api.Http)
HttpOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Http.class.getName());
}
// Use Http.newBuilder() to construct.
private Http(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private Http() {
rules_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.HttpProto.internal_static_google_api_Http_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Http.class, com.google.api.Http.Builder.class);
}
public static final int RULES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List<com.google.api.HttpRule> rules_;
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
@java.lang.Override
public java.util.List<com.google.api.HttpRule> getRulesList() {
return rules_;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
@java.lang.Override
public java.util.List<? extends com.google.api.HttpRuleOrBuilder>
getRulesOrBuilderList() {
return rules_;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
@java.lang.Override
public int getRulesCount() {
return rules_.size();
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
@java.lang.Override
public com.google.api.HttpRule getRules(int index) {
return rules_.get(index);
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
@java.lang.Override
public com.google.api.HttpRuleOrBuilder getRulesOrBuilder(
int index) {
return rules_.get(index);
}
public static final int FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER = 2;
private boolean fullyDecodeReservedExpansion_ = false;
/**
* <pre>
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
* </pre>
*
* <code>bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"];</code>
* @return The fullyDecodeReservedExpansion.
*/
@java.lang.Override
public boolean getFullyDecodeReservedExpansion() {
return fullyDecodeReservedExpansion_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < rules_.size(); i++) {
output.writeMessage(1, rules_.get(i));
}
if (fullyDecodeReservedExpansion_ != false) {
output.writeBool(2, fullyDecodeReservedExpansion_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < rules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, rules_.get(i));
}
if (fullyDecodeReservedExpansion_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, fullyDecodeReservedExpansion_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.api.Http)) {
return super.equals(obj);
}
com.google.api.Http other = (com.google.api.Http) obj;
if (!getRulesList()
.equals(other.getRulesList())) return false;
if (getFullyDecodeReservedExpansion()
!= other.getFullyDecodeReservedExpansion()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getRulesCount() > 0) {
hash = (37 * hash) + RULES_FIELD_NUMBER;
hash = (53 * hash) + getRulesList().hashCode();
}
hash = (37 * hash) + FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getFullyDecodeReservedExpansion());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.Http parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Http parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Http parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Http parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Http parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Http parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Http parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.Http parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.Http parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.Http parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.Http parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.Http parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.Http prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Defines the HTTP configuration for an API service. It contains a list of
* [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
* to one or more HTTP REST API methods.
* </pre>
*
* Protobuf type {@code google.api.Http}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:google.api.Http)
com.google.api.HttpOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.HttpProto.internal_static_google_api_Http_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Http.class, com.google.api.Http.Builder.class);
}
// Construct using com.google.api.Http.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
} else {
rules_ = null;
rulesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
fullyDecodeReservedExpansion_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.HttpProto.internal_static_google_api_Http_descriptor;
}
@java.lang.Override
public com.google.api.Http getDefaultInstanceForType() {
return com.google.api.Http.getDefaultInstance();
}
@java.lang.Override
public com.google.api.Http build() {
com.google.api.Http result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.Http buildPartial() {
com.google.api.Http result = new com.google.api.Http(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.api.Http result) {
if (rulesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.rules_ = rules_;
} else {
result.rules_ = rulesBuilder_.build();
}
}
private void buildPartial0(com.google.api.Http result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.fullyDecodeReservedExpansion_ = fullyDecodeReservedExpansion_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.Http) {
return mergeFrom((com.google.api.Http)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.Http other) {
if (other == com.google.api.Http.getDefaultInstance()) return this;
if (rulesBuilder_ == null) {
if (!other.rules_.isEmpty()) {
if (rules_.isEmpty()) {
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRulesIsMutable();
rules_.addAll(other.rules_);
}
onChanged();
}
} else {
if (!other.rules_.isEmpty()) {
if (rulesBuilder_.isEmpty()) {
rulesBuilder_.dispose();
rulesBuilder_ = null;
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000001);
rulesBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getRulesFieldBuilder() : null;
} else {
rulesBuilder_.addAllMessages(other.rules_);
}
}
}
if (other.getFullyDecodeReservedExpansion() != false) {
setFullyDecodeReservedExpansion(other.getFullyDecodeReservedExpansion());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.api.HttpRule m =
input.readMessage(
com.google.api.HttpRule.parser(),
extensionRegistry);
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(m);
} else {
rulesBuilder_.addMessage(m);
}
break;
} // case 10
case 16: {
fullyDecodeReservedExpansion_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List<com.google.api.HttpRule> rules_ =
java.util.Collections.emptyList();
private void ensureRulesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
rules_ = new java.util.ArrayList<com.google.api.HttpRule>(rules_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> rulesBuilder_;
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public java.util.List<com.google.api.HttpRule> getRulesList() {
if (rulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(rules_);
} else {
return rulesBuilder_.getMessageList();
}
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public int getRulesCount() {
if (rulesBuilder_ == null) {
return rules_.size();
} else {
return rulesBuilder_.getCount();
}
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public com.google.api.HttpRule getRules(int index) {
if (rulesBuilder_ == null) {
return rules_.get(index);
} else {
return rulesBuilder_.getMessage(index);
}
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder setRules(
int index, com.google.api.HttpRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.set(index, value);
onChanged();
} else {
rulesBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder setRules(
int index, com.google.api.HttpRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.set(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder addRules(com.google.api.HttpRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(value);
onChanged();
} else {
rulesBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder addRules(
int index, com.google.api.HttpRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(index, value);
onChanged();
} else {
rulesBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder addRules(
com.google.api.HttpRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder addRules(
int index, com.google.api.HttpRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder addAllRules(
java.lang.Iterable<? extends com.google.api.HttpRule> values) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rules_);
onChanged();
} else {
rulesBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder clearRules() {
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
rulesBuilder_.clear();
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public Builder removeRules(int index) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.remove(index);
onChanged();
} else {
rulesBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public com.google.api.HttpRule.Builder getRulesBuilder(
int index) {
return getRulesFieldBuilder().getBuilder(index);
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public com.google.api.HttpRuleOrBuilder getRulesOrBuilder(
int index) {
if (rulesBuilder_ == null) {
return rules_.get(index); } else {
return rulesBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public java.util.List<? extends com.google.api.HttpRuleOrBuilder>
getRulesOrBuilderList() {
if (rulesBuilder_ != null) {
return rulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rules_);
}
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public com.google.api.HttpRule.Builder addRulesBuilder() {
return getRulesFieldBuilder().addBuilder(
com.google.api.HttpRule.getDefaultInstance());
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public com.google.api.HttpRule.Builder addRulesBuilder(
int index) {
return getRulesFieldBuilder().addBuilder(
index, com.google.api.HttpRule.getDefaultInstance());
}
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
public java.util.List<com.google.api.HttpRule.Builder>
getRulesBuilderList() {
return getRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>
getRulesFieldBuilder() {
if (rulesBuilder_ == null) {
rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>(
rules_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
rules_ = null;
}
return rulesBuilder_;
}
private boolean fullyDecodeReservedExpansion_ ;
/**
* <pre>
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
* </pre>
*
* <code>bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"];</code>
* @return The fullyDecodeReservedExpansion.
*/
@java.lang.Override
public boolean getFullyDecodeReservedExpansion() {
return fullyDecodeReservedExpansion_;
}
/**
* <pre>
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
* </pre>
*
* <code>bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"];</code>
* @param value The fullyDecodeReservedExpansion to set.
* @return This builder for chaining.
*/
public Builder setFullyDecodeReservedExpansion(boolean value) {
fullyDecodeReservedExpansion_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
* </pre>
*
* <code>bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"];</code>
* @return This builder for chaining.
*/
public Builder clearFullyDecodeReservedExpansion() {
bitField0_ = (bitField0_ & ~0x00000002);
fullyDecodeReservedExpansion_ = false;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:google.api.Http)
}
// @@protoc_insertion_point(class_scope:google.api.Http)
private static final com.google.api.Http DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.Http();
}
public static com.google.api.Http getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Http>
PARSER = new com.google.protobuf.AbstractParser<Http>() {
@java.lang.Override
public Http parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<Http> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Http> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.api.Http getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,80 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/http.proto
// Protobuf Java Version: 4.28.2
package com.google.api;
public interface HttpOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.Http)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
java.util.List<com.google.api.HttpRule>
getRulesList();
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
com.google.api.HttpRule getRules(int index);
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
int getRulesCount();
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
java.util.List<? extends com.google.api.HttpRuleOrBuilder>
getRulesOrBuilderList();
/**
* <pre>
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* </pre>
*
* <code>repeated .google.api.HttpRule rules = 1 [json_name = "rules"];</code>
*/
com.google.api.HttpRuleOrBuilder getRulesOrBuilder(
int index);
/**
* <pre>
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
* </pre>
*
* <code>bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"];</code>
* @return The fullyDecodeReservedExpansion.
*/
boolean getFullyDecodeReservedExpansion();
}
@@ -0,0 +1,98 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/http.proto
// Protobuf Java Version: 4.28.2
package com.google.api;
public final class HttpProto {
private HttpProto() {}
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
HttpProto.class.getName());
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_api_Http_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_api_Http_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_api_HttpRule_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_api_HttpRule_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_api_CustomHttpPattern_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_api_CustomHttpPattern_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\025google/api/http.proto\022\ngoogle.api\"y\n\004H" +
"ttp\022*\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" +
"R\005rules\022E\n\037fully_decode_reserved_expansi" +
"on\030\002 \001(\010R\034fullyDecodeReservedExpansion\"\332" +
"\002\n\010HttpRule\022\032\n\010selector\030\001 \001(\tR\010selector\022" +
"\022\n\003get\030\002 \001(\tH\000R\003get\022\022\n\003put\030\003 \001(\tH\000R\003put\022" +
"\024\n\004post\030\004 \001(\tH\000R\004post\022\030\n\006delete\030\005 \001(\tH\000R" +
"\006delete\022\026\n\005patch\030\006 \001(\tH\000R\005patch\0227\n\006custo" +
"m\030\010 \001(\0132\035.google.api.CustomHttpPatternH\000" +
"R\006custom\022\022\n\004body\030\007 \001(\tR\004body\022#\n\rresponse" +
"_body\030\014 \001(\tR\014responseBody\022E\n\023additional_" +
"bindings\030\013 \003(\0132\024.google.api.HttpRuleR\022ad" +
"ditionalBindingsB\t\n\007pattern\";\n\021CustomHtt" +
"pPattern\022\022\n\004kind\030\001 \001(\tR\004kind\022\022\n\004path\030\002 \001" +
"(\tR\004pathB\252\001\n\016com.google.apiB\tHttpProtoP\001" +
"ZAgoogle.golang.org/genproto/googleapis/" +
"api/annotations;annotations\370\001\001\242\002\003GAX\252\002\nG" +
"oogle.Api\312\002\nGoogle\\Api\342\002\026Google\\Api\\GPBM" +
"etadata\352\002\013Google::Apib\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_google_api_Http_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_google_api_Http_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_api_Http_descriptor,
new java.lang.String[] { "Rules", "FullyDecodeReservedExpansion", });
internal_static_google_api_HttpRule_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_google_api_HttpRule_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_api_HttpRule_descriptor,
new java.lang.String[] { "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "ResponseBody", "AdditionalBindings", "Pattern", });
internal_static_google_api_CustomHttpPattern_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_google_api_CustomHttpPattern_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_api_CustomHttpPattern_descriptor,
new java.lang.String[] { "Kind", "Path", });
descriptor.resolveAllFeaturesImmutable();
}
// @@protoc_insertion_point(outer_class_scope)
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,337 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/api/http.proto
// Protobuf Java Version: 4.28.2
package com.google.api;
public interface HttpRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.HttpRule)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Selects a method to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
* </pre>
*
* <code>string selector = 1 [json_name = "selector"];</code>
* @return The selector.
*/
java.lang.String getSelector();
/**
* <pre>
* Selects a method to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
* </pre>
*
* <code>string selector = 1 [json_name = "selector"];</code>
* @return The bytes for selector.
*/
com.google.protobuf.ByteString
getSelectorBytes();
/**
* <pre>
* Maps to HTTP GET. Used for listing and getting information about
* resources.
* </pre>
*
* <code>string get = 2 [json_name = "get"];</code>
* @return Whether the get field is set.
*/
boolean hasGet();
/**
* <pre>
* Maps to HTTP GET. Used for listing and getting information about
* resources.
* </pre>
*
* <code>string get = 2 [json_name = "get"];</code>
* @return The get.
*/
java.lang.String getGet();
/**
* <pre>
* Maps to HTTP GET. Used for listing and getting information about
* resources.
* </pre>
*
* <code>string get = 2 [json_name = "get"];</code>
* @return The bytes for get.
*/
com.google.protobuf.ByteString
getGetBytes();
/**
* <pre>
* Maps to HTTP PUT. Used for replacing a resource.
* </pre>
*
* <code>string put = 3 [json_name = "put"];</code>
* @return Whether the put field is set.
*/
boolean hasPut();
/**
* <pre>
* Maps to HTTP PUT. Used for replacing a resource.
* </pre>
*
* <code>string put = 3 [json_name = "put"];</code>
* @return The put.
*/
java.lang.String getPut();
/**
* <pre>
* Maps to HTTP PUT. Used for replacing a resource.
* </pre>
*
* <code>string put = 3 [json_name = "put"];</code>
* @return The bytes for put.
*/
com.google.protobuf.ByteString
getPutBytes();
/**
* <pre>
* Maps to HTTP POST. Used for creating a resource or performing an action.
* </pre>
*
* <code>string post = 4 [json_name = "post"];</code>
* @return Whether the post field is set.
*/
boolean hasPost();
/**
* <pre>
* Maps to HTTP POST. Used for creating a resource or performing an action.
* </pre>
*
* <code>string post = 4 [json_name = "post"];</code>
* @return The post.
*/
java.lang.String getPost();
/**
* <pre>
* Maps to HTTP POST. Used for creating a resource or performing an action.
* </pre>
*
* <code>string post = 4 [json_name = "post"];</code>
* @return The bytes for post.
*/
com.google.protobuf.ByteString
getPostBytes();
/**
* <pre>
* Maps to HTTP DELETE. Used for deleting a resource.
* </pre>
*
* <code>string delete = 5 [json_name = "delete"];</code>
* @return Whether the delete field is set.
*/
boolean hasDelete();
/**
* <pre>
* Maps to HTTP DELETE. Used for deleting a resource.
* </pre>
*
* <code>string delete = 5 [json_name = "delete"];</code>
* @return The delete.
*/
java.lang.String getDelete();
/**
* <pre>
* Maps to HTTP DELETE. Used for deleting a resource.
* </pre>
*
* <code>string delete = 5 [json_name = "delete"];</code>
* @return The bytes for delete.
*/
com.google.protobuf.ByteString
getDeleteBytes();
/**
* <pre>
* Maps to HTTP PATCH. Used for updating a resource.
* </pre>
*
* <code>string patch = 6 [json_name = "patch"];</code>
* @return Whether the patch field is set.
*/
boolean hasPatch();
/**
* <pre>
* Maps to HTTP PATCH. Used for updating a resource.
* </pre>
*
* <code>string patch = 6 [json_name = "patch"];</code>
* @return The patch.
*/
java.lang.String getPatch();
/**
* <pre>
* Maps to HTTP PATCH. Used for updating a resource.
* </pre>
*
* <code>string patch = 6 [json_name = "patch"];</code>
* @return The bytes for patch.
*/
com.google.protobuf.ByteString
getPatchBytes();
/**
* <pre>
* The custom pattern is used for specifying an HTTP method that is not
* included in the `pattern` field, such as HEAD, or "*" to leave the
* HTTP method unspecified for this rule. The wild-card rule is useful
* for services that provide content to Web (HTML) clients.
* </pre>
*
* <code>.google.api.CustomHttpPattern custom = 8 [json_name = "custom"];</code>
* @return Whether the custom field is set.
*/
boolean hasCustom();
/**
* <pre>
* The custom pattern is used for specifying an HTTP method that is not
* included in the `pattern` field, such as HEAD, or "*" to leave the
* HTTP method unspecified for this rule. The wild-card rule is useful
* for services that provide content to Web (HTML) clients.
* </pre>
*
* <code>.google.api.CustomHttpPattern custom = 8 [json_name = "custom"];</code>
* @return The custom.
*/
com.google.api.CustomHttpPattern getCustom();
/**
* <pre>
* The custom pattern is used for specifying an HTTP method that is not
* included in the `pattern` field, such as HEAD, or "*" to leave the
* HTTP method unspecified for this rule. The wild-card rule is useful
* for services that provide content to Web (HTML) clients.
* </pre>
*
* <code>.google.api.CustomHttpPattern custom = 8 [json_name = "custom"];</code>
*/
com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder();
/**
* <pre>
* The name of the request field whose value is mapped to the HTTP request
* body, or `*` for mapping all request fields not captured by the path
* pattern to the HTTP body, or omitted for not having any HTTP request body.
*
* NOTE: the referred field must be present at the top-level of the request
* message type.
* </pre>
*
* <code>string body = 7 [json_name = "body"];</code>
* @return The body.
*/
java.lang.String getBody();
/**
* <pre>
* The name of the request field whose value is mapped to the HTTP request
* body, or `*` for mapping all request fields not captured by the path
* pattern to the HTTP body, or omitted for not having any HTTP request body.
*
* NOTE: the referred field must be present at the top-level of the request
* message type.
* </pre>
*
* <code>string body = 7 [json_name = "body"];</code>
* @return The bytes for body.
*/
com.google.protobuf.ByteString
getBodyBytes();
/**
* <pre>
* Optional. The name of the response field whose value is mapped to the HTTP
* response body. When omitted, the entire response message will be used
* as the HTTP response body.
*
* NOTE: The referred field must be present at the top-level of the response
* message type.
* </pre>
*
* <code>string response_body = 12 [json_name = "responseBody"];</code>
* @return The responseBody.
*/
java.lang.String getResponseBody();
/**
* <pre>
* Optional. The name of the response field whose value is mapped to the HTTP
* response body. When omitted, the entire response message will be used
* as the HTTP response body.
*
* NOTE: The referred field must be present at the top-level of the response
* message type.
* </pre>
*
* <code>string response_body = 12 [json_name = "responseBody"];</code>
* @return The bytes for responseBody.
*/
com.google.protobuf.ByteString
getResponseBodyBytes();
/**
* <pre>
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
* </pre>
*
* <code>repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"];</code>
*/
java.util.List<com.google.api.HttpRule>
getAdditionalBindingsList();
/**
* <pre>
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
* </pre>
*
* <code>repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"];</code>
*/
com.google.api.HttpRule getAdditionalBindings(int index);
/**
* <pre>
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
* </pre>
*
* <code>repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"];</code>
*/
int getAdditionalBindingsCount();
/**
* <pre>
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
* </pre>
*
* <code>repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"];</code>
*/
java.util.List<? extends com.google.api.HttpRuleOrBuilder>
getAdditionalBindingsOrBuilderList();
/**
* <pre>
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
* </pre>
*
* <code>repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"];</code>
*/
com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(
int index);
com.google.api.HttpRule.PatternCase getPatternCase();
}
@@ -0,0 +1,179 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/annotations.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public final class AnnotationsProto {
private AnnotationsProto() {}
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AnnotationsProto.class.getName());
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger);
registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation);
registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Schema);
registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Tag);
registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Field);
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public static final int OPENAPIV2_SWAGGER_FIELD_NUMBER = 1042;
/**
* <pre>
* ID assigned by protobuf-global-extension-registry&#64;google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
* </pre>
*
* <code>extend .google.protobuf.FileOptions { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.protobuf.DescriptorProtos.FileOptions,
com.grpc.gateway.protoc_gen_openapiv2.options.Swagger> openapiv2Swagger = com.google.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.class,
com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance());
public static final int OPENAPIV2_OPERATION_FIELD_NUMBER = 1042;
/**
* <pre>
* ID assigned by protobuf-global-extension-registry&#64;google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
* </pre>
*
* <code>extend .google.protobuf.MethodOptions { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.protobuf.DescriptorProtos.MethodOptions,
com.grpc.gateway.protoc_gen_openapiv2.options.Operation> openapiv2Operation = com.google.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
com.grpc.gateway.protoc_gen_openapiv2.options.Operation.class,
com.grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance());
public static final int OPENAPIV2_SCHEMA_FIELD_NUMBER = 1042;
/**
* <pre>
* ID assigned by protobuf-global-extension-registry&#64;google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
* </pre>
*
* <code>extend .google.protobuf.MessageOptions { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.protobuf.DescriptorProtos.MessageOptions,
com.grpc.gateway.protoc_gen_openapiv2.options.Schema> openapiv2Schema = com.google.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
com.grpc.gateway.protoc_gen_openapiv2.options.Schema.class,
com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance());
public static final int OPENAPIV2_TAG_FIELD_NUMBER = 1042;
/**
* <pre>
* ID assigned by protobuf-global-extension-registry&#64;google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
* </pre>
*
* <code>extend .google.protobuf.ServiceOptions { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.protobuf.DescriptorProtos.ServiceOptions,
com.grpc.gateway.protoc_gen_openapiv2.options.Tag> openapiv2Tag = com.google.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
com.grpc.gateway.protoc_gen_openapiv2.options.Tag.class,
com.grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance());
public static final int OPENAPIV2_FIELD_FIELD_NUMBER = 1042;
/**
* <pre>
* ID assigned by protobuf-global-extension-registry&#64;google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
* </pre>
*
* <code>extend .google.protobuf.FieldOptions { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessage.GeneratedExtension<
com.google.protobuf.DescriptorProtos.FieldOptions,
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema> openapiv2Field = com.google.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class,
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance());
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n.protoc-gen-openapiv2/options/annotatio" +
"ns.proto\022)grpc.gateway.protoc_gen_openap" +
"iv2.options\032 google/protobuf/descriptor." +
"proto\032,protoc-gen-openapiv2/options/open" +
"apiv2.proto:~\n\021openapiv2_swagger\022\034.googl" +
"e.protobuf.FileOptions\030\222\010 \001(\01322.grpc.gat" +
"eway.protoc_gen_openapiv2.options.Swagge" +
"rR\020openapiv2Swagger:\206\001\n\023openapiv2_operat" +
"ion\022\036.google.protobuf.MethodOptions\030\222\010 \001" +
"(\01324.grpc.gateway.protoc_gen_openapiv2.o" +
"ptions.OperationR\022openapiv2Operation:~\n\020" +
"openapiv2_schema\022\037.google.protobuf.Messa" +
"geOptions\030\222\010 \001(\01321.grpc.gateway.protoc_g" +
"en_openapiv2.options.SchemaR\017openapiv2Sc" +
"hema:u\n\ropenapiv2_tag\022\037.google.protobuf." +
"ServiceOptions\030\222\010 \001(\0132..grpc.gateway.pro" +
"toc_gen_openapiv2.options.TagR\014openapiv2" +
"Tag:~\n\017openapiv2_field\022\035.google.protobuf" +
".FieldOptions\030\222\010 \001(\01325.grpc.gateway.prot" +
"oc_gen_openapiv2.options.JSONSchemaR\016ope" +
"napiv2FieldB\311\002\n-com.grpc.gateway.protoc_" +
"gen_openapiv2.optionsB\020AnnotationsProtoP" +
"\001ZFgithub.com/grpc-ecosystem/grpc-gatewa" +
"y/v2/protoc-gen-openapiv2/options\242\002\004GGPO" +
"\252\002\'Grpc.Gateway.ProtocGenOpenapiv2.Optio" +
"ns\312\002\'Grpc\\Gateway\\ProtocGenOpenapiv2\\Opt" +
"ions\342\0023Grpc\\Gateway\\ProtocGenOpenapiv2\\O" +
"ptions\\GPBMetadata\352\002*Grpc::Gateway::Prot" +
"ocGenOpenapiv2::Optionsb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.DescriptorProtos.getDescriptor(),
com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor(),
});
openapiv2Swagger.internalInit(descriptor.getExtensions().get(0));
openapiv2Operation.internalInit(descriptor.getExtensions().get(1));
openapiv2Schema.internalInit(descriptor.getExtensions().get(2));
openapiv2Tag.internalInit(descriptor.getExtensions().get(3));
openapiv2Field.internalInit(descriptor.getExtensions().get(4));
descriptor.resolveAllFeaturesImmutable();
com.google.protobuf.DescriptorProtos.getDescriptor();
com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
@@ -0,0 +1,913 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
/**
* <pre>
* `Contact` is a representation of OpenAPI v2 specification's Contact object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
*
* Example:
*
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* contact: {
* name: "gRPC-Gateway project";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* email: "none&#64;example.com";
* };
* ...
* };
* ...
* };
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact}
*/
public final class Contact extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact)
ContactOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Contact.class.getName());
}
// Use Contact.newBuilder() to construct.
private Contact(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private Contact() {
name_ = "";
url_ = "";
email_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.Contact.class, com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object url_ = "";
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
}
}
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EMAIL_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object email_ = "";
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The email.
*/
@java.lang.Override
public java.lang.String getEmail() {
java.lang.Object ref = email_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
email_ = s;
return s;
}
}
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The bytes for email.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEmailBytes() {
java.lang.Object ref = email_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
email_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, url_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 3, email_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(3, email_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Contact)) {
return super.equals(obj);
}
com.grpc.gateway.protoc_gen_openapiv2.options.Contact other = (com.grpc.gateway.protoc_gen_openapiv2.options.Contact) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!getEmail()
.equals(other.getEmail())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (37 * hash) + EMAIL_FIELD_NUMBER;
hash = (53 * hash) + getEmail().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Contact prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* `Contact` is a representation of OpenAPI v2 specification's Contact object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
*
* Example:
*
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* contact: {
* name: "gRPC-Gateway project";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* email: "none&#64;example.com";
* };
* ...
* };
* ...
* };
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact)
com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.Contact.class, com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class);
}
// Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Contact.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
url_ = "";
email_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance();
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Contact build() {
com.grpc.gateway.protoc_gen_openapiv2.options.Contact result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Contact buildPartial() {
com.grpc.gateway.protoc_gen_openapiv2.options.Contact result = new com.grpc.gateway.protoc_gen_openapiv2.options.Contact(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Contact result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.url_ = url_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.email_ = email_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Contact) {
return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Contact)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Contact other) {
if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getEmail().isEmpty()) {
email_ = other.email_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
url_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
email_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
url_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
url_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object email_ = "";
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The email.
*/
public java.lang.String getEmail() {
java.lang.Object ref = email_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
email_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The bytes for email.
*/
public com.google.protobuf.ByteString
getEmailBytes() {
java.lang.Object ref = email_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
email_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @param value The email to set.
* @return This builder for chaining.
*/
public Builder setEmail(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
email_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return This builder for chaining.
*/
public Builder clearEmail() {
email_ = getDefaultInstance().getEmail();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @param value The bytes for email to set.
* @return This builder for chaining.
*/
public Builder setEmailBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
email_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact)
private static final com.grpc.gateway.protoc_gen_openapiv2.options.Contact DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Contact();
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Contact>
PARSER = new com.google.protobuf.AbstractParser<Contact>() {
@java.lang.Override
public Contact parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<Contact> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Contact> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,75 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface ContactOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Contact)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
java.lang.String getName();
/**
* <pre>
* The identifying name of the contact person/organization.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
java.lang.String getUrl();
/**
* <pre>
* The URL pointing to the contact information. MUST be in the format of a
* URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The email.
*/
java.lang.String getEmail();
/**
* <pre>
* The email address of the contact person/organization. MUST be in the format
* of an email address.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The bytes for email.
*/
com.google.protobuf.ByteString
getEmailBytes();
}
@@ -0,0 +1,743 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
/**
* <pre>
* `ExternalDocumentation` is a representation of OpenAPI v2 specification's
* ExternalDocumentation object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
*
* Example:
*
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* ...
* external_docs: {
* description: "More about gRPC-Gateway";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* }
* ...
* };
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation}
*/
public final class ExternalDocumentation extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
ExternalDocumentationOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
ExternalDocumentation.class.getName());
}
// Use ExternalDocumentation.newBuilder() to construct.
private ExternalDocumentation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private ExternalDocumentation() {
description_ = "";
url_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class);
}
public static final int DESCRIPTION_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object url_ = "";
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
}
}
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, description_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, url_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)) {
return super.equals(obj);
}
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other = (com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) obj;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* `ExternalDocumentation` is a representation of OpenAPI v2 specification's
* ExternalDocumentation object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
*
* Example:
*
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* ...
* external_docs: {
* description: "More about gRPC-Gateway";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* }
* ...
* };
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class);
}
// Construct using com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
description_ = "";
url_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance();
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation build() {
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation buildPartial() {
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = new com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.url_ = url_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) {
return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other) {
if (other == com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) return this;
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
url_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object description_ = "";
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
description_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
url_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
url_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
private static final com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation();
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<ExternalDocumentation>
PARSER = new com.google.protobuf.AbstractParser<ExternalDocumentation>() {
@java.lang.Override
public ExternalDocumentation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<ExternalDocumentation> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<ExternalDocumentation> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,55 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface ExternalDocumentationOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
java.lang.String getUrl();
/**
* <pre>
* The URL for the target documentation. Value MUST be in the format
* of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,115 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface HeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Header)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* `Description` is a short description of the header.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* `Description` is a short description of the header.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* </pre>
*
* <code>string type = 2 [json_name = "type"];</code>
* @return The type.
*/
java.lang.String getType();
/**
* <pre>
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* </pre>
*
* <code>string type = 2 [json_name = "type"];</code>
* @return The bytes for type.
*/
com.google.protobuf.ByteString
getTypeBytes();
/**
* <pre>
* `Format` The extending format for the previously mentioned type.
* </pre>
*
* <code>string format = 3 [json_name = "format"];</code>
* @return The format.
*/
java.lang.String getFormat();
/**
* <pre>
* `Format` The extending format for the previously mentioned type.
* </pre>
*
* <code>string format = 3 [json_name = "format"];</code>
* @return The bytes for format.
*/
com.google.protobuf.ByteString
getFormatBytes();
/**
* <pre>
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
* </pre>
*
* <code>string default = 6 [json_name = "default"];</code>
* @return The default.
*/
java.lang.String getDefault();
/**
* <pre>
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
* </pre>
*
* <code>string default = 6 [json_name = "default"];</code>
* @return The bytes for default.
*/
com.google.protobuf.ByteString
getDefaultBytes();
/**
* <pre>
* 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
* </pre>
*
* <code>string pattern = 13 [json_name = "pattern"];</code>
* @return The pattern.
*/
java.lang.String getPattern();
/**
* <pre>
* 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
* </pre>
*
* <code>string pattern = 13 [json_name = "pattern"];</code>
* @return The bytes for pattern.
*/
com.google.protobuf.ByteString
getPatternBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,102 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface HeaderParameterOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* `Name` is the header name.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
java.lang.String getName();
/**
* <pre>
* `Name` is the header name.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <pre>
* `Description` is a short description of the header.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* `Description` is a short description of the header.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"];</code>
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
* <pre>
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"];</code>
* @return The type.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType();
/**
* <pre>
* `Format` The extending format for the previously mentioned type.
* </pre>
*
* <code>string format = 4 [json_name = "format"];</code>
* @return The format.
*/
java.lang.String getFormat();
/**
* <pre>
* `Format` The extending format for the previously mentioned type.
* </pre>
*
* <code>string format = 4 [json_name = "format"];</code>
* @return The bytes for format.
*/
com.google.protobuf.ByteString
getFormatBytes();
/**
* <pre>
* `Required` indicates if the header is optional
* </pre>
*
* <code>bool required = 5 [json_name = "required"];</code>
* @return The required.
*/
boolean getRequired();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,213 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface InfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Info)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The title of the application.
* </pre>
*
* <code>string title = 1 [json_name = "title"];</code>
* @return The title.
*/
java.lang.String getTitle();
/**
* <pre>
* The title of the application.
* </pre>
*
* <code>string title = 1 [json_name = "title"];</code>
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
* <pre>
* A short description of the application. GFM syntax can be used for rich
* text representation.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* A short description of the application. GFM syntax can be used for rich
* text representation.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* The Terms of Service for the API.
* </pre>
*
* <code>string terms_of_service = 3 [json_name = "termsOfService"];</code>
* @return The termsOfService.
*/
java.lang.String getTermsOfService();
/**
* <pre>
* The Terms of Service for the API.
* </pre>
*
* <code>string terms_of_service = 3 [json_name = "termsOfService"];</code>
* @return The bytes for termsOfService.
*/
com.google.protobuf.ByteString
getTermsOfServiceBytes();
/**
* <pre>
* The contact information for the exposed API.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"];</code>
* @return Whether the contact field is set.
*/
boolean hasContact();
/**
* <pre>
* The contact information for the exposed API.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"];</code>
* @return The contact.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Contact getContact();
/**
* <pre>
* The contact information for the exposed API.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder();
/**
* <pre>
* The license information for the exposed API.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"];</code>
* @return Whether the license field is set.
*/
boolean hasLicense();
/**
* <pre>
* The license information for the exposed API.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"];</code>
* @return The license.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.License getLicense();
/**
* <pre>
* The license information for the exposed API.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder();
/**
* <pre>
* Provides the version of the application API (not to be confused
* with the specification version).
* </pre>
*
* <code>string version = 6 [json_name = "version"];</code>
* @return The version.
*/
java.lang.String getVersion();
/**
* <pre>
* Provides the version of the application API (not to be confused
* with the specification version).
* </pre>
*
* <code>string version = 6 [json_name = "version"];</code>
* @return The bytes for version.
*/
com.google.protobuf.ByteString
getVersionBytes();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 7 [json_name = "extensions"];</code>
*/
int getExtensionsCount();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 7 [json_name = "extensions"];</code>
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensions();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 7 [json_name = "extensions"];</code>
*/
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensionsMap();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 7 [json_name = "extensions"];</code>
*/
/* nullable */
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Value defaultValue);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 7 [json_name = "extensions"];</code>
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,464 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface JSONSchemaOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Ref is used to define an external reference to include in the message.
* This could be a fully qualified proto message reference, and that type must
* be imported into the protofile. If no message is identified, the Ref will
* be used verbatim in the output.
* For example:
* `ref: ".google.protobuf.Timestamp"`.
* </pre>
*
* <code>string ref = 3 [json_name = "ref"];</code>
* @return The ref.
*/
java.lang.String getRef();
/**
* <pre>
* Ref is used to define an external reference to include in the message.
* This could be a fully qualified proto message reference, and that type must
* be imported into the protofile. If no message is identified, the Ref will
* be used verbatim in the output.
* For example:
* `ref: ".google.protobuf.Timestamp"`.
* </pre>
*
* <code>string ref = 3 [json_name = "ref"];</code>
* @return The bytes for ref.
*/
com.google.protobuf.ByteString
getRefBytes();
/**
* <pre>
* The title of the schema.
* </pre>
*
* <code>string title = 5 [json_name = "title"];</code>
* @return The title.
*/
java.lang.String getTitle();
/**
* <pre>
* The title of the schema.
* </pre>
*
* <code>string title = 5 [json_name = "title"];</code>
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
* <pre>
* A short description of the schema.
* </pre>
*
* <code>string description = 6 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* A short description of the schema.
* </pre>
*
* <code>string description = 6 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <code>string default = 7 [json_name = "default"];</code>
* @return The default.
*/
java.lang.String getDefault();
/**
* <code>string default = 7 [json_name = "default"];</code>
* @return The bytes for default.
*/
com.google.protobuf.ByteString
getDefaultBytes();
/**
* <code>bool read_only = 8 [json_name = "readOnly"];</code>
* @return The readOnly.
*/
boolean getReadOnly();
/**
* <pre>
* A free-form property to include a JSON example of this field. This is copied
* verbatim to the output swagger.json. Quotes must be escaped.
* This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
* </pre>
*
* <code>string example = 9 [json_name = "example"];</code>
* @return The example.
*/
java.lang.String getExample();
/**
* <pre>
* A free-form property to include a JSON example of this field. This is copied
* verbatim to the output swagger.json. Quotes must be escaped.
* This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
* </pre>
*
* <code>string example = 9 [json_name = "example"];</code>
* @return The bytes for example.
*/
com.google.protobuf.ByteString
getExampleBytes();
/**
* <code>double multiple_of = 10 [json_name = "multipleOf"];</code>
* @return The multipleOf.
*/
double getMultipleOf();
/**
* <pre>
* Maximum represents an inclusive upper limit for a numeric instance. The
* value of MUST be a number,
* </pre>
*
* <code>double maximum = 11 [json_name = "maximum"];</code>
* @return The maximum.
*/
double getMaximum();
/**
* <code>bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"];</code>
* @return The exclusiveMaximum.
*/
boolean getExclusiveMaximum();
/**
* <pre>
* minimum represents an inclusive lower limit for a numeric instance. The
* value of MUST be a number,
* </pre>
*
* <code>double minimum = 13 [json_name = "minimum"];</code>
* @return The minimum.
*/
double getMinimum();
/**
* <code>bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"];</code>
* @return The exclusiveMinimum.
*/
boolean getExclusiveMinimum();
/**
* <code>uint64 max_length = 15 [json_name = "maxLength"];</code>
* @return The maxLength.
*/
long getMaxLength();
/**
* <code>uint64 min_length = 16 [json_name = "minLength"];</code>
* @return The minLength.
*/
long getMinLength();
/**
* <code>string pattern = 17 [json_name = "pattern"];</code>
* @return The pattern.
*/
java.lang.String getPattern();
/**
* <code>string pattern = 17 [json_name = "pattern"];</code>
* @return The bytes for pattern.
*/
com.google.protobuf.ByteString
getPatternBytes();
/**
* <code>uint64 max_items = 20 [json_name = "maxItems"];</code>
* @return The maxItems.
*/
long getMaxItems();
/**
* <code>uint64 min_items = 21 [json_name = "minItems"];</code>
* @return The minItems.
*/
long getMinItems();
/**
* <code>bool unique_items = 22 [json_name = "uniqueItems"];</code>
* @return The uniqueItems.
*/
boolean getUniqueItems();
/**
* <code>uint64 max_properties = 24 [json_name = "maxProperties"];</code>
* @return The maxProperties.
*/
long getMaxProperties();
/**
* <code>uint64 min_properties = 25 [json_name = "minProperties"];</code>
* @return The minProperties.
*/
long getMinProperties();
/**
* <code>repeated string required = 26 [json_name = "required"];</code>
* @return A list containing the required.
*/
java.util.List<java.lang.String>
getRequiredList();
/**
* <code>repeated string required = 26 [json_name = "required"];</code>
* @return The count of required.
*/
int getRequiredCount();
/**
* <code>repeated string required = 26 [json_name = "required"];</code>
* @param index The index of the element to return.
* @return The required at the given index.
*/
java.lang.String getRequired(int index);
/**
* <code>repeated string required = 26 [json_name = "required"];</code>
* @param index The index of the value to return.
* @return The bytes of the required at the given index.
*/
com.google.protobuf.ByteString
getRequiredBytes(int index);
/**
* <pre>
* Items in 'array' must be unique.
* </pre>
*
* <code>repeated string array = 34 [json_name = "array"];</code>
* @return A list containing the array.
*/
java.util.List<java.lang.String>
getArrayList();
/**
* <pre>
* Items in 'array' must be unique.
* </pre>
*
* <code>repeated string array = 34 [json_name = "array"];</code>
* @return The count of array.
*/
int getArrayCount();
/**
* <pre>
* Items in 'array' must be unique.
* </pre>
*
* <code>repeated string array = 34 [json_name = "array"];</code>
* @param index The index of the element to return.
* @return The array at the given index.
*/
java.lang.String getArray(int index);
/**
* <pre>
* Items in 'array' must be unique.
* </pre>
*
* <code>repeated string array = 34 [json_name = "array"];</code>
* @param index The index of the value to return.
* @return The bytes of the array at the given index.
*/
com.google.protobuf.ByteString
getArrayBytes(int index);
/**
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"];</code>
* @return A list containing the type.
*/
java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes> getTypeList();
/**
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"];</code>
* @return The count of type.
*/
int getTypeCount();
/**
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"];</code>
* @param index The index of the element to return.
* @return The type at the given index.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index);
/**
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"];</code>
* @return A list containing the enum numeric values on the wire for type.
*/
java.util.List<java.lang.Integer>
getTypeValueList();
/**
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"];</code>
* @param index The index of the value to return.
* @return The enum numeric value on the wire of type at the given index.
*/
int getTypeValue(int index);
/**
* <pre>
* `Format`
* </pre>
*
* <code>string format = 36 [json_name = "format"];</code>
* @return The format.
*/
java.lang.String getFormat();
/**
* <pre>
* `Format`
* </pre>
*
* <code>string format = 36 [json_name = "format"];</code>
* @return The bytes for format.
*/
com.google.protobuf.ByteString
getFormatBytes();
/**
* <pre>
* Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
* </pre>
*
* <code>repeated string enum = 46 [json_name = "enum"];</code>
* @return A list containing the enum.
*/
java.util.List<java.lang.String>
getEnumList();
/**
* <pre>
* Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
* </pre>
*
* <code>repeated string enum = 46 [json_name = "enum"];</code>
* @return The count of enum.
*/
int getEnumCount();
/**
* <pre>
* Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
* </pre>
*
* <code>repeated string enum = 46 [json_name = "enum"];</code>
* @param index The index of the element to return.
* @return The enum at the given index.
*/
java.lang.String getEnum(int index);
/**
* <pre>
* Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
* </pre>
*
* <code>repeated string enum = 46 [json_name = "enum"];</code>
* @param index The index of the value to return.
* @return The bytes of the enum at the given index.
*/
com.google.protobuf.ByteString
getEnumBytes(int index);
/**
* <pre>
* Additional field level properties used when generating the OpenAPI v2 file.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"];</code>
* @return Whether the fieldConfiguration field is set.
*/
boolean hasFieldConfiguration();
/**
* <pre>
* Additional field level properties used when generating the OpenAPI v2 file.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"];</code>
* @return The fieldConfiguration.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration();
/**
* <pre>
* Additional field level properties used when generating the OpenAPI v2 file.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 48 [json_name = "extensions"];</code>
*/
int getExtensionsCount();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 48 [json_name = "extensions"];</code>
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensions();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 48 [json_name = "extensions"];</code>
*/
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensionsMap();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 48 [json_name = "extensions"];</code>
*/
/* nullable */
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Value defaultValue);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 48 [json_name = "extensions"];</code>
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,733 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
/**
* <pre>
* `License` is a representation of OpenAPI v2 specification's License object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
*
* Example:
*
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* license: {
* name: "BSD 3-Clause License";
* url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
* };
* ...
* };
* ...
* };
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License}
*/
public final class License extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.License)
LicenseOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
License.class.getName());
}
// Use License.newBuilder() to construct.
private License(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private License() {
name_ = "";
url_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.License.class, com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object url_ = "";
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
}
}
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, url_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.License)) {
return super.equals(obj);
}
com.grpc.gateway.protoc_gen_openapiv2.options.License other = (com.grpc.gateway.protoc_gen_openapiv2.options.License) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.License prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* `License` is a representation of OpenAPI v2 specification's License object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
*
* Example:
*
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* license: {
* name: "BSD 3-Clause License";
* url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
* };
* ...
* };
* ...
* };
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.License)
com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.License.class, com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class);
}
// Construct using com.grpc.gateway.protoc_gen_openapiv2.options.License.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
url_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance();
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.License build() {
com.grpc.gateway.protoc_gen_openapiv2.options.License result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.License buildPartial() {
com.grpc.gateway.protoc_gen_openapiv2.options.License result = new com.grpc.gateway.protoc_gen_openapiv2.options.License(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.License result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.url_ = url_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.License) {
return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.License)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.License other) {
if (other == com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
url_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
url_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
url_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.License)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.License)
private static final com.grpc.gateway.protoc_gen_openapiv2.options.License DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.License();
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<License>
PARSER = new com.google.protobuf.AbstractParser<License>() {
@java.lang.Override
public License parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<License> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<License> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,51 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface LicenseOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.License)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
java.lang.String getName();
/**
* <pre>
* The license name used for the API.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The url.
*/
java.lang.String getUrl();
/**
* <pre>
* A URL to the license used for the API. MUST be in the format of a URL.
* </pre>
*
* <code>string url = 2 [json_name = "url"];</code>
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
}
@@ -0,0 +1,617 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public final class Openapiv2Proto {
private Openapiv2Proto() {}
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Openapiv2Proto.class.getName());
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor;
static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n,protoc-gen-openapiv2/options/openapiv2" +
".proto\022)grpc.gateway.protoc_gen_openapiv" +
"2.options\032\034google/protobuf/struct.proto\"" +
"\263\010\n\007Swagger\022\030\n\007swagger\030\001 \001(\tR\007swagger\022C\n" +
"\004info\030\002 \001(\0132/.grpc.gateway.protoc_gen_op" +
"enapiv2.options.InfoR\004info\022\022\n\004host\030\003 \001(\t" +
"R\004host\022\033\n\tbase_path\030\004 \001(\tR\010basePath\022K\n\007s" +
"chemes\030\005 \003(\01621.grpc.gateway.protoc_gen_o" +
"penapiv2.options.SchemeR\007schemes\022\032\n\010cons" +
"umes\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010" +
"produces\022_\n\tresponses\030\n \003(\0132A.grpc.gatew" +
"ay.protoc_gen_openapiv2.options.Swagger." +
"ResponsesEntryR\tresponses\022q\n\024security_de" +
"finitions\030\013 \001(\0132>.grpc.gateway.protoc_ge" +
"n_openapiv2.options.SecurityDefinitionsR" +
"\023securityDefinitions\022Z\n\010security\030\014 \003(\0132>" +
".grpc.gateway.protoc_gen_openapiv2.optio" +
"ns.SecurityRequirementR\010security\022B\n\004tags" +
"\030\r \003(\0132..grpc.gateway.protoc_gen_openapi" +
"v2.options.TagR\004tags\022e\n\rexternal_docs\030\016 " +
"\001(\[email protected]_gen_openapiv2." +
"options.ExternalDocumentationR\014externalD" +
"ocs\022b\n\nextensions\030\017 \003(\0132B.grpc.gateway.p" +
"rotoc_gen_openapiv2.options.Swagger.Exte" +
"nsionsEntryR\nextensions\032q\n\016ResponsesEntr" +
"y\022\020\n\003key\030\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grp" +
"c.gateway.protoc_gen_openapiv2.options.R" +
"esponseR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n" +
"\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." +
"protobuf.ValueR\005value:\0028\001J\004\010\010\020\tJ\004\010\t\020\n\"\326\007" +
"\n\tOperation\022\022\n\004tags\030\001 \003(\tR\004tags\022\030\n\007summa" +
"ry\030\002 \001(\tR\007summary\022 \n\013description\030\003 \001(\tR\013" +
"description\022e\n\rexternal_docs\030\004 \001(\[email protected]" +
"c.gateway.protoc_gen_openapiv2.options.E" +
"xternalDocumentationR\014externalDocs\022!\n\014op" +
"eration_id\030\005 \001(\tR\013operationId\022\032\n\010consume" +
"s\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010pro" +
"duces\022a\n\tresponses\030\t \003(\0132C.grpc.gateway." +
"protoc_gen_openapiv2.options.Operation.R" +
"esponsesEntryR\tresponses\022K\n\007schemes\030\n \003(" +
"\01621.grpc.gateway.protoc_gen_openapiv2.op" +
"tions.SchemeR\007schemes\022\036\n\ndeprecated\030\013 \001(" +
"\010R\ndeprecated\022Z\n\010security\030\014 \003(\0132>.grpc.g" +
"ateway.protoc_gen_openapiv2.options.Secu" +
"rityRequirementR\010security\022d\n\nextensions\030" +
"\r \003(\0132D.grpc.gateway.protoc_gen_openapiv" +
"2.options.Operation.ExtensionsEntryR\next" +
"ensions\022U\n\nparameters\030\016 \001(\01325.grpc.gatew" +
"ay.protoc_gen_openapiv2.options.Paramete" +
"rsR\nparameters\032q\n\016ResponsesEntry\022\020\n\003key\030" +
"\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grpc.gateway" +
".protoc_gen_openapiv2.options.ResponseR\005" +
"value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(" +
"\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf." +
"ValueR\005value:\0028\001J\004\010\010\020\t\"b\n\nParameters\022T\n\007" +
"headers\030\001 \003(\0132:.grpc.gateway.protoc_gen_" +
"openapiv2.options.HeaderParameterR\007heade" +
"rs\"\243\002\n\017HeaderParameter\022\022\n\004name\030\001 \001(\tR\004na" +
"me\022 \n\013description\030\002 \001(\tR\013description\022S\n\004" +
"type\030\003 \001(\0162?.grpc.gateway.protoc_gen_ope" +
"napiv2.options.HeaderParameter.TypeR\004typ" +
"e\022\026\n\006format\030\004 \001(\tR\006format\022\032\n\010required\030\005 " +
"\001(\010R\010required\"E\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006ST" +
"RING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003\022\013\n\007BOOLE" +
"AN\020\004J\004\010\006\020\007J\004\010\007\020\010\"\330\001\n\006Header\022 \n\013descripti" +
"on\030\001 \001(\tR\013description\022\022\n\004type\030\002 \001(\tR\004typ" +
"e\022\026\n\006format\030\003 \001(\tR\006format\022\030\n\007default\030\006 \001" +
"(\tR\007default\022\030\n\007pattern\030\r \001(\tR\007patternJ\004\010" +
"\004\020\005J\004\010\005\020\006J\004\010\007\020\010J\004\010\010\020\tJ\004\010\t\020\nJ\004\010\n\020\013J\004\010\013\020\014J" +
"\004\010\014\020\rJ\004\010\016\020\017J\004\010\017\020\020J\004\010\020\020\021J\004\010\021\020\022J\004\010\022\020\023\"\232\005\n\010" +
"Response\022 \n\013description\030\001 \001(\tR\013descripti" +
"on\022I\n\006schema\030\002 \001(\01321.grpc.gateway.protoc" +
"_gen_openapiv2.options.SchemaR\006schema\022Z\n" +
"\007headers\030\003 \003(\[email protected]_gen" +
"_openapiv2.options.Response.HeadersEntry" +
"R\007headers\022]\n\010examples\030\004 \003(\0132A.grpc.gatew" +
"ay.protoc_gen_openapiv2.options.Response" +
".ExamplesEntryR\010examples\022c\n\nextensions\030\005" +
" \003(\0132C.grpc.gateway.protoc_gen_openapiv2" +
".options.Response.ExtensionsEntryR\nexten" +
"sions\032m\n\014HeadersEntry\022\020\n\003key\030\001 \001(\tR\003key\022" +
"G\n\005value\030\002 \001(\01321.grpc.gateway.protoc_gen" +
"_openapiv2.options.HeaderR\005value:\0028\001\032;\n\r" +
"ExamplesEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value" +
"\030\002 \001(\tR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003" +
"key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.p" +
"rotobuf.ValueR\005value:\0028\001\"\326\003\n\004Info\022\024\n\005tit" +
"le\030\001 \001(\tR\005title\022 \n\013description\030\002 \001(\tR\013de" +
"scription\022(\n\020terms_of_service\030\003 \001(\tR\016ter" +
"msOfService\022L\n\007contact\030\004 \001(\01322.grpc.gate" +
"way.protoc_gen_openapiv2.options.Contact" +
"R\007contact\022L\n\007license\030\005 \001(\01322.grpc.gatewa" +
"y.protoc_gen_openapiv2.options.LicenseR\007" +
"license\022\030\n\007version\030\006 \001(\tR\007version\022_\n\next" +
"ensions\030\007 \003(\0132?.grpc.gateway.protoc_gen_" +
"openapiv2.options.Info.ExtensionsEntryR\n" +
"extensions\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001" +
"(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf" +
".ValueR\005value:\0028\001\"E\n\007Contact\022\022\n\004name\030\001 \001" +
"(\tR\004name\022\020\n\003url\030\002 \001(\tR\003url\022\024\n\005email\030\003 \001(" +
"\tR\005email\"/\n\007License\022\022\n\004name\030\001 \001(\tR\004name\022" +
"\020\n\003url\030\002 \001(\tR\003url\"K\n\025ExternalDocumentati" +
"on\022 \n\013description\030\001 \001(\tR\013description\022\020\n\003" +
"url\030\002 \001(\tR\003url\"\252\002\n\006Schema\022V\n\013json_schema" +
"\030\001 \001(\01325.grpc.gateway.protoc_gen_openapi" +
"v2.options.JSONSchemaR\njsonSchema\022$\n\rdis" +
"criminator\030\002 \001(\tR\rdiscriminator\022\033\n\tread_" +
"only\030\003 \001(\010R\010readOnly\022e\n\rexternal_docs\030\005 " +
"\001(\[email protected]_gen_openapiv2." +
"options.ExternalDocumentationR\014externalD" +
"ocs\022\030\n\007example\030\006 \001(\tR\007exampleJ\004\010\004\020\005\"\327\n\n\n" +
"JSONSchema\022\020\n\003ref\030\003 \001(\tR\003ref\022\024\n\005title\030\005 " +
"\001(\tR\005title\022 \n\013description\030\006 \001(\tR\013descrip" +
"tion\022\030\n\007default\030\007 \001(\tR\007default\022\033\n\tread_o" +
"nly\030\010 \001(\010R\010readOnly\022\030\n\007example\030\t \001(\tR\007ex" +
"ample\022\037\n\013multiple_of\030\n \001(\001R\nmultipleOf\022\030" +
"\n\007maximum\030\013 \001(\001R\007maximum\022+\n\021exclusive_ma" +
"ximum\030\014 \001(\010R\020exclusiveMaximum\022\030\n\007minimum" +
"\030\r \001(\001R\007minimum\022+\n\021exclusive_minimum\030\016 \001" +
"(\010R\020exclusiveMinimum\022\035\n\nmax_length\030\017 \001(\004" +
"R\tmaxLength\022\035\n\nmin_length\030\020 \001(\004R\tminLeng" +
"th\022\030\n\007pattern\030\021 \001(\tR\007pattern\022\033\n\tmax_item" +
"s\030\024 \001(\004R\010maxItems\022\033\n\tmin_items\030\025 \001(\004R\010mi" +
"nItems\022!\n\014unique_items\030\026 \001(\010R\013uniqueItem" +
"s\022%\n\016max_properties\030\030 \001(\004R\rmaxProperties" +
"\022%\n\016min_properties\030\031 \001(\004R\rminProperties\022" +
"\032\n\010required\030\032 \003(\tR\010required\022\024\n\005array\030\" \003" +
"(\tR\005array\022_\n\004type\030# \003(\0162K.grpc.gateway.p" +
"rotoc_gen_openapiv2.options.JSONSchema.J" +
"SONSchemaSimpleTypesR\004type\022\026\n\006format\030$ \001" +
"(\tR\006format\022\022\n\004enum\030. \003(\tR\004enum\022z\n\023field_" +
"configuration\030\351\007 \001(\0132H.grpc.gateway.prot" +
"oc_gen_openapiv2.options.JSONSchema.Fiel" +
"dConfigurationR\022fieldConfiguration\022e\n\nex" +
"tensions\0300 \003(\0132E.grpc.gateway.protoc_gen" +
"_openapiv2.options.JSONSchema.Extensions" +
"EntryR\nextensions\032<\n\022FieldConfiguration\022" +
"&\n\017path_param_name\030/ \001(\tR\rpathParamName\032" +
"U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005" +
"value\030\002 \001(\0132\026.google.protobuf.ValueR\005val" +
"ue:\0028\001\"w\n\025JSONSchemaSimpleTypes\022\013\n\007UNKNO" +
"WN\020\000\022\t\n\005ARRAY\020\001\022\013\n\007BOOLEAN\020\002\022\013\n\007INTEGER\020" +
"\003\022\010\n\004NULL\020\004\022\n\n\006NUMBER\020\005\022\n\n\006OBJECT\020\006\022\n\n\006S" +
"TRING\020\007J\004\010\001\020\002J\004\010\002\020\003J\004\010\004\020\005J\004\010\022\020\023J\004\010\023\020\024J\004\010" +
"\027\020\030J\004\010\033\020\034J\004\010\034\020\035J\004\010\035\020\036J\004\010\036\020\"J\004\010%\020*J\004\010*\020+J" +
"\004\010+\020.\"\331\002\n\003Tag\022\022\n\004name\030\001 \001(\tR\004name\022 \n\013des" +
"cription\030\002 \001(\tR\013description\022e\n\rexternal_" +
"docs\030\003 \001(\[email protected]_gen_ope" +
"napiv2.options.ExternalDocumentationR\014ex" +
"ternalDocs\022^\n\nextensions\030\004 \003(\0132>.grpc.ga" +
"teway.protoc_gen_openapiv2.options.Tag.E" +
"xtensionsEntryR\nextensions\032U\n\017Extensions" +
"Entry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026" +
".google.protobuf.ValueR\005value:\0028\001\"\367\001\n\023Se" +
"curityDefinitions\022h\n\010security\030\001 \003(\0132L.gr" +
"pc.gateway.protoc_gen_openapiv2.options." +
"SecurityDefinitions.SecurityEntryR\010secur" +
"ity\032v\n\rSecurityEntry\022\020\n\003key\030\001 \001(\tR\003key\022O" +
"\n\005value\030\002 \001(\01329.grpc.gateway.protoc_gen_" +
"openapiv2.options.SecuritySchemeR\005value:" +
"\0028\001\"\377\006\n\016SecurityScheme\022R\n\004type\030\001 \001(\0162>.g" +
"rpc.gateway.protoc_gen_openapiv2.options" +
".SecurityScheme.TypeR\004type\022 \n\013descriptio" +
"n\030\002 \001(\tR\013description\022\022\n\004name\030\003 \001(\tR\004name" +
"\022L\n\002in\030\004 \001(\0162<.grpc.gateway.protoc_gen_o" +
"penapiv2.options.SecurityScheme.InR\002in\022R" +
"\n\004flow\030\005 \001(\0162>.grpc.gateway.protoc_gen_o" +
"penapiv2.options.SecurityScheme.FlowR\004fl" +
"ow\022+\n\021authorization_url\030\006 \001(\tR\020authoriza" +
"tionUrl\022\033\n\ttoken_url\030\007 \001(\tR\010tokenUrl\022I\n\006" +
"scopes\030\010 \001(\01321.grpc.gateway.protoc_gen_o" +
"penapiv2.options.ScopesR\006scopes\022i\n\nexten" +
"sions\030\t \003(\0132I.grpc.gateway.protoc_gen_op" +
"enapiv2.options.SecurityScheme.Extension" +
"sEntryR\nextensions\032U\n\017ExtensionsEntry\022\020\n" +
"\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." +
"protobuf.ValueR\005value:\0028\001\"K\n\004Type\022\020\n\014TYP" +
"E_INVALID\020\000\022\016\n\nTYPE_BASIC\020\001\022\020\n\014TYPE_API_" +
"KEY\020\002\022\017\n\013TYPE_OAUTH2\020\003\"1\n\002In\022\016\n\nIN_INVAL" +
"ID\020\000\022\014\n\010IN_QUERY\020\001\022\r\n\tIN_HEADER\020\002\"j\n\004Flo" +
"w\022\020\n\014FLOW_INVALID\020\000\022\021\n\rFLOW_IMPLICIT\020\001\022\021" +
"\n\rFLOW_PASSWORD\020\002\022\024\n\020FLOW_APPLICATION\020\003\022" +
"\024\n\020FLOW_ACCESS_CODE\020\004\"\366\002\n\023SecurityRequir" +
"ement\022\212\001\n\024security_requirement\030\001 \003(\0132W.g" +
"rpc.gateway.protoc_gen_openapiv2.options" +
".SecurityRequirement.SecurityRequirement" +
"EntryR\023securityRequirement\0320\n\030SecurityRe" +
"quirementValue\022\024\n\005scope\030\001 \003(\tR\005scope\032\237\001\n" +
"\030SecurityRequirementEntry\022\020\n\003key\030\001 \001(\tR\003" +
"key\022m\n\005value\030\002 \001(\0132W.grpc.gateway.protoc" +
"_gen_openapiv2.options.SecurityRequireme" +
"nt.SecurityRequirementValueR\005value:\0028\001\"\226" +
"\001\n\006Scopes\022R\n\005scope\030\001 \003(\0132<.grpc.gateway." +
"protoc_gen_openapiv2.options.Scopes.Scop" +
"eEntryR\005scope\0328\n\nScopeEntry\022\020\n\003key\030\001 \001(\t" +
"R\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001*;\n\006Schem" +
"e\022\013\n\007UNKNOWN\020\000\022\010\n\004HTTP\020\001\022\t\n\005HTTPS\020\002\022\006\n\002W" +
"S\020\003\022\007\n\003WSS\020\004B\307\002\n-com.grpc.gateway.protoc" +
"_gen_openapiv2.optionsB\016Openapiv2ProtoP\001" +
"ZFgithub.com/grpc-ecosystem/grpc-gateway" +
"/v2/protoc-gen-openapiv2/options\242\002\004GGPO\252" +
"\002\'Grpc.Gateway.ProtocGenOpenapiv2.Option" +
"s\312\002\'Grpc\\Gateway\\ProtocGenOpenapiv2\\Opti" +
"ons\342\0023Grpc\\Gateway\\ProtocGenOpenapiv2\\Op" +
"tions\\GPBMetadata\352\002*Grpc::Gateway::Proto" +
"cGenOpenapiv2::Optionsb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.StructProto.getDescriptor(),
});
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor,
new java.lang.String[] { "Swagger", "Info", "Host", "BasePath", "Schemes", "Consumes", "Produces", "Responses", "SecurityDefinitions", "Security", "Tags", "ExternalDocs", "Extensions", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(1);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor,
new java.lang.String[] { "Tags", "Summary", "Description", "ExternalDocs", "OperationId", "Consumes", "Produces", "Responses", "Schemes", "Deprecated", "Security", "Extensions", "Parameters", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(1);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor,
new java.lang.String[] { "Headers", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor,
new java.lang.String[] { "Name", "Description", "Type", "Format", "Required", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor,
new java.lang.String[] { "Description", "Type", "Format", "Default", "Pattern", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor,
new java.lang.String[] { "Description", "Schema", "Headers", "Examples", "Extensions", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(1);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(2);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor,
new java.lang.String[] { "Title", "Description", "TermsOfService", "Contact", "License", "Version", "Extensions", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor,
new java.lang.String[] { "Name", "Url", "Email", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor,
new java.lang.String[] { "Name", "Url", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor,
new java.lang.String[] { "Description", "Url", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor,
new java.lang.String[] { "JsonSchema", "Discriminator", "ReadOnly", "ExternalDocs", "Example", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor,
new java.lang.String[] { "Ref", "Title", "Description", "Default", "ReadOnly", "Example", "MultipleOf", "Maximum", "ExclusiveMaximum", "Minimum", "ExclusiveMinimum", "MaxLength", "MinLength", "Pattern", "MaxItems", "MinItems", "UniqueItems", "MaxProperties", "MinProperties", "Required", "Array", "Type", "Format", "Enum", "FieldConfiguration", "Extensions", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor,
new java.lang.String[] { "PathParamName", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(1);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor,
new java.lang.String[] { "Name", "Description", "ExternalDocs", "Extensions", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor =
getDescriptor().getMessageTypes().get(13);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor,
new java.lang.String[] { "Security", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor =
getDescriptor().getMessageTypes().get(14);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor,
new java.lang.String[] { "Type", "Description", "Name", "In", "Flow", "AuthorizationUrl", "TokenUrl", "Scopes", "Extensions", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor =
getDescriptor().getMessageTypes().get(15);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor,
new java.lang.String[] { "SecurityRequirement", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor,
new java.lang.String[] { "Scope", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(1);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor =
getDescriptor().getMessageTypes().get(16);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor,
new java.lang.String[] { "Scope", });
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor =
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor.getNestedTypes().get(0);
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
descriptor.resolveAllFeaturesImmutable();
com.google.protobuf.StructProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,541 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface OperationOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Operation)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated string tags = 1 [json_name = "tags"];</code>
* @return A list containing the tags.
*/
java.util.List<java.lang.String>
getTagsList();
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated string tags = 1 [json_name = "tags"];</code>
* @return The count of tags.
*/
int getTagsCount();
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated string tags = 1 [json_name = "tags"];</code>
* @param index The index of the element to return.
* @return The tags at the given index.
*/
java.lang.String getTags(int index);
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated string tags = 1 [json_name = "tags"];</code>
* @param index The index of the value to return.
* @return The bytes of the tags at the given index.
*/
com.google.protobuf.ByteString
getTagsBytes(int index);
/**
* <pre>
* A short summary of what the operation does. For maximum readability in the
* swagger-ui, this field SHOULD be less than 120 characters.
* </pre>
*
* <code>string summary = 2 [json_name = "summary"];</code>
* @return The summary.
*/
java.lang.String getSummary();
/**
* <pre>
* A short summary of what the operation does. For maximum readability in the
* swagger-ui, this field SHOULD be less than 120 characters.
* </pre>
*
* <code>string summary = 2 [json_name = "summary"];</code>
* @return The bytes for summary.
*/
com.google.protobuf.ByteString
getSummaryBytes();
/**
* <pre>
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 3 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
* </pre>
*
* <code>string description = 3 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* Additional external documentation for this operation.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"];</code>
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
* <pre>
* Additional external documentation for this operation.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"];</code>
* @return The externalDocs.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs();
/**
* <pre>
* Additional external documentation for this operation.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
/**
* <pre>
* Unique string used to identify the operation. The id MUST be unique among
* all operations described in the API. Tools and libraries MAY use the
* operationId to uniquely identify an operation, therefore, it is recommended
* to follow common programming naming conventions.
* </pre>
*
* <code>string operation_id = 5 [json_name = "operationId"];</code>
* @return The operationId.
*/
java.lang.String getOperationId();
/**
* <pre>
* Unique string used to identify the operation. The id MUST be unique among
* all operations described in the API. Tools and libraries MAY use the
* operationId to uniquely identify an operation, therefore, it is recommended
* to follow common programming naming conventions.
* </pre>
*
* <code>string operation_id = 5 [json_name = "operationId"];</code>
* @return The bytes for operationId.
*/
com.google.protobuf.ByteString
getOperationIdBytes();
/**
* <pre>
* A list of MIME types the operation can consume. This overrides the consumes
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @return A list containing the consumes.
*/
java.util.List<java.lang.String>
getConsumesList();
/**
* <pre>
* A list of MIME types the operation can consume. This overrides the consumes
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @return The count of consumes.
*/
int getConsumesCount();
/**
* <pre>
* A list of MIME types the operation can consume. This overrides the consumes
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
java.lang.String getConsumes(int index);
/**
* <pre>
* A list of MIME types the operation can consume. This overrides the consumes
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
com.google.protobuf.ByteString
getConsumesBytes(int index);
/**
* <pre>
* A list of MIME types the operation can produce. This overrides the produces
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @return A list containing the produces.
*/
java.util.List<java.lang.String>
getProducesList();
/**
* <pre>
* A list of MIME types the operation can produce. This overrides the produces
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @return The count of produces.
*/
int getProducesCount();
/**
* <pre>
* A list of MIME types the operation can produce. This overrides the produces
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @param index The index of the element to return.
* @return The produces at the given index.
*/
java.lang.String getProduces(int index);
/**
* <pre>
* A list of MIME types the operation can produce. This overrides the produces
* definition at the OpenAPI Object. An empty value MAY be used to clear the
* global definition. Value MUST be as described under Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
com.google.protobuf.ByteString
getProducesBytes(int index);
/**
* <pre>
* The list of possible responses as they are returned from executing this
* operation.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 9 [json_name = "responses"];</code>
*/
int getResponsesCount();
/**
* <pre>
* The list of possible responses as they are returned from executing this
* operation.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 9 [json_name = "responses"];</code>
*/
boolean containsResponses(
java.lang.String key);
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response>
getResponses();
/**
* <pre>
* The list of possible responses as they are returned from executing this
* operation.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 9 [json_name = "responses"];</code>
*/
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response>
getResponsesMap();
/**
* <pre>
* The list of possible responses as they are returned from executing this
* operation.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 9 [json_name = "responses"];</code>
*/
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault(
java.lang.String key,
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue);
/**
* <pre>
* The list of possible responses as they are returned from executing this
* operation.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 9 [json_name = "responses"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow(
java.lang.String key);
/**
* <pre>
* The transfer protocol for the operation. Values MUST be from the list:
* "http", "https", "ws", "wss". The value overrides the OpenAPI Object
* schemes definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"];</code>
* @return A list containing the schemes.
*/
java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.Scheme> getSchemesList();
/**
* <pre>
* The transfer protocol for the operation. Values MUST be from the list:
* "http", "https", "ws", "wss". The value overrides the OpenAPI Object
* schemes definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"];</code>
* @return The count of schemes.
*/
int getSchemesCount();
/**
* <pre>
* The transfer protocol for the operation. Values MUST be from the list:
* "http", "https", "ws", "wss". The value overrides the OpenAPI Object
* schemes definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"];</code>
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index);
/**
* <pre>
* The transfer protocol for the operation. Values MUST be from the list:
* "http", "https", "ws", "wss". The value overrides the OpenAPI Object
* schemes definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"];</code>
* @return A list containing the enum numeric values on the wire for schemes.
*/
java.util.List<java.lang.Integer>
getSchemesValueList();
/**
* <pre>
* The transfer protocol for the operation. Values MUST be from the list:
* "http", "https", "ws", "wss". The value overrides the OpenAPI Object
* schemes definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"];</code>
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
int getSchemesValue(int index);
/**
* <pre>
* Declares this operation to be deprecated. Usage of the declared operation
* should be refrained. Default value is false.
* </pre>
*
* <code>bool deprecated = 11 [json_name = "deprecated"];</code>
* @return The deprecated.
*/
boolean getDeprecated();
/**
* <pre>
* A declaration of which security schemes are applied for this operation. The
* list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements). This
* definition overrides any declared top-level security. To remove a top-level
* security declaration, an empty array can be used.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement>
getSecurityList();
/**
* <pre>
* A declaration of which security schemes are applied for this operation. The
* list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements). This
* definition overrides any declared top-level security. To remove a top-level
* security declaration, an empty array can be used.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index);
/**
* <pre>
* A declaration of which security schemes are applied for this operation. The
* list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements). This
* definition overrides any declared top-level security. To remove a top-level
* security declaration, an empty array can be used.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
int getSecurityCount();
/**
* <pre>
* A declaration of which security schemes are applied for this operation. The
* list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements). This
* definition overrides any declared top-level security. To remove a top-level
* security declaration, an empty array can be used.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
java.util.List<? extends com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>
getSecurityOrBuilderList();
/**
* <pre>
* A declaration of which security schemes are applied for this operation. The
* list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements). This
* definition overrides any declared top-level security. To remove a top-level
* security declaration, an empty array can be used.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 13 [json_name = "extensions"];</code>
*/
int getExtensionsCount();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 13 [json_name = "extensions"];</code>
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensions();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 13 [json_name = "extensions"];</code>
*/
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensionsMap();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 13 [json_name = "extensions"];</code>
*/
/* nullable */
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Value defaultValue);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 13 [json_name = "extensions"];</code>
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
/**
* <pre>
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"];</code>
* @return Whether the parameters field is set.
*/
boolean hasParameters();
/**
* <pre>
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"];</code>
* @return The parameters.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters();
/**
* <pre>
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder();
}
@@ -0,0 +1,850 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
/**
* <pre>
* `Parameters` is a representation of OpenAPI v2 specification's parameters object.
* Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
* allow header parameters to be set here since we do not want users specifying custom non-header
* parameters beyond those inferred from the Protobuf schema.
* See: https://swagger.io/specification/v2/#parameter-object
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters}
*/
public final class Parameters extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
ParametersOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Parameters.class.getName());
}
// Use Parameters.newBuilder() to construct.
private Parameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private Parameters() {
headers_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class);
}
public static final int HEADERS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter> headers_;
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
@java.lang.Override
public java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter> getHeadersList() {
return headers_;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
@java.lang.Override
public java.util.List<? extends com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>
getHeadersOrBuilderList() {
return headers_;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
@java.lang.Override
public int getHeadersCount() {
return headers_.size();
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) {
return headers_.get(index);
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder(
int index) {
return headers_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < headers_.size(); i++) {
output.writeMessage(1, headers_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < headers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, headers_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Parameters)) {
return super.equals(obj);
}
com.grpc.gateway.protoc_gen_openapiv2.options.Parameters other = (com.grpc.gateway.protoc_gen_openapiv2.options.Parameters) obj;
if (!getHeadersList()
.equals(other.getHeadersList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getHeadersCount() > 0) {
hash = (37 * hash) + HEADERS_FIELD_NUMBER;
hash = (53 * hash) + getHeadersList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* `Parameters` is a representation of OpenAPI v2 specification's parameters object.
* Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
* allow header parameters to be set here since we do not want users specifying custom non-header
* parameters beyond those inferred from the Protobuf schema.
* See: https://swagger.io/specification/v2/#parameter-object
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class);
}
// Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (headersBuilder_ == null) {
headers_ = java.util.Collections.emptyList();
} else {
headers_ = null;
headersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance();
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters build() {
com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters buildPartial() {
com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result = new com.grpc.gateway.protoc_gen_openapiv2.options.Parameters(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result) {
if (headersBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
headers_ = java.util.Collections.unmodifiableList(headers_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.headers_ = headers_;
} else {
result.headers_ = headersBuilder_.build();
}
}
private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Parameters) {
return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Parameters)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters other) {
if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance()) return this;
if (headersBuilder_ == null) {
if (!other.headers_.isEmpty()) {
if (headers_.isEmpty()) {
headers_ = other.headers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureHeadersIsMutable();
headers_.addAll(other.headers_);
}
onChanged();
}
} else {
if (!other.headers_.isEmpty()) {
if (headersBuilder_.isEmpty()) {
headersBuilder_.dispose();
headersBuilder_ = null;
headers_ = other.headers_;
bitField0_ = (bitField0_ & ~0x00000001);
headersBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getHeadersFieldBuilder() : null;
} else {
headersBuilder_.addAllMessages(other.headers_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter m =
input.readMessage(
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.parser(),
extensionRegistry);
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.add(m);
} else {
headersBuilder_.addMessage(m);
}
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter> headers_ =
java.util.Collections.emptyList();
private void ensureHeadersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
headers_ = new java.util.ArrayList<com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter>(headers_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder> headersBuilder_;
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter> getHeadersList() {
if (headersBuilder_ == null) {
return java.util.Collections.unmodifiableList(headers_);
} else {
return headersBuilder_.getMessageList();
}
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public int getHeadersCount() {
if (headersBuilder_ == null) {
return headers_.size();
} else {
return headersBuilder_.getCount();
}
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) {
if (headersBuilder_ == null) {
return headers_.get(index);
} else {
return headersBuilder_.getMessage(index);
}
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder setHeaders(
int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.set(index, value);
onChanged();
} else {
headersBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder setHeaders(
int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.set(index, builderForValue.build());
onChanged();
} else {
headersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder addHeaders(com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.add(value);
onChanged();
} else {
headersBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder addHeaders(
int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.add(index, value);
onChanged();
} else {
headersBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder addHeaders(
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.add(builderForValue.build());
onChanged();
} else {
headersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder addHeaders(
int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.add(index, builderForValue.build());
onChanged();
} else {
headersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder addAllHeaders(
java.lang.Iterable<? extends com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter> values) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, headers_);
onChanged();
} else {
headersBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder clearHeaders() {
if (headersBuilder_ == null) {
headers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
headersBuilder_.clear();
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public Builder removeHeaders(int index) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.remove(index);
onChanged();
} else {
headersBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder getHeadersBuilder(
int index) {
return getHeadersFieldBuilder().getBuilder(index);
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder(
int index) {
if (headersBuilder_ == null) {
return headers_.get(index); } else {
return headersBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public java.util.List<? extends com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>
getHeadersOrBuilderList() {
if (headersBuilder_ != null) {
return headersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(headers_);
}
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder() {
return getHeadersFieldBuilder().addBuilder(
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance());
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder(
int index) {
return getHeadersFieldBuilder().addBuilder(
index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance());
}
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
public java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder>
getHeadersBuilderList() {
return getHeadersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>
getHeadersFieldBuilder() {
if (headersBuilder_ == null) {
headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>(
headers_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
headers_ = null;
}
return headersBuilder_;
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
private static final com.grpc.gateway.protoc_gen_openapiv2.options.Parameters DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Parameters();
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Parameters>
PARSER = new com.google.protobuf.AbstractParser<Parameters>() {
@java.lang.Override
public Parameters parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<Parameters> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Parameters> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,60 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface ParametersOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter>
getHeadersList();
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index);
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
int getHeadersCount();
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
java.util.List<? extends com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>
getHeadersOrBuilderList();
/**
* <pre>
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder(
int index);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,250 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface ResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Response)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
* </pre>
*
* <code>string description = 1 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"];</code>
* @return Whether the schema field is set.
*/
boolean hasSchema();
/**
* <pre>
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"];</code>
* @return The schema.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema();
/**
* <pre>
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder();
/**
* <pre>
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Header&gt; headers = 3 [json_name = "headers"];</code>
*/
int getHeadersCount();
/**
* <pre>
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Header&gt; headers = 3 [json_name = "headers"];</code>
*/
boolean containsHeaders(
java.lang.String key);
/**
* Use {@link #getHeadersMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Header>
getHeaders();
/**
* <pre>
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Header&gt; headers = 3 [json_name = "headers"];</code>
*/
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Header>
getHeadersMap();
/**
* <pre>
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Header&gt; headers = 3 [json_name = "headers"];</code>
*/
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault(
java.lang.String key,
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue);
/**
* <pre>
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Header&gt; headers = 3 [json_name = "headers"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow(
java.lang.String key);
/**
* <pre>
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
* </pre>
*
* <code>map&lt;string, string&gt; examples = 4 [json_name = "examples"];</code>
*/
int getExamplesCount();
/**
* <pre>
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
* </pre>
*
* <code>map&lt;string, string&gt; examples = 4 [json_name = "examples"];</code>
*/
boolean containsExamples(
java.lang.String key);
/**
* Use {@link #getExamplesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getExamples();
/**
* <pre>
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
* </pre>
*
* <code>map&lt;string, string&gt; examples = 4 [json_name = "examples"];</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getExamplesMap();
/**
* <pre>
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
* </pre>
*
* <code>map&lt;string, string&gt; examples = 4 [json_name = "examples"];</code>
*/
/* nullable */
java.lang.String getExamplesOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
* </pre>
*
* <code>map&lt;string, string&gt; examples = 4 [json_name = "examples"];</code>
*/
java.lang.String getExamplesOrThrow(
java.lang.String key);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 5 [json_name = "extensions"];</code>
*/
int getExtensionsCount();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 5 [json_name = "extensions"];</code>
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensions();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 5 [json_name = "extensions"];</code>
*/
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensionsMap();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 5 [json_name = "extensions"];</code>
*/
/* nullable */
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Value defaultValue);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 5 [json_name = "extensions"];</code>
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,117 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface SchemaOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Schema)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"];</code>
* @return Whether the jsonSchema field is set.
*/
boolean hasJsonSchema();
/**
* <code>.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"];</code>
* @return The jsonSchema.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema();
/**
* <code>.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder();
/**
* <pre>
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
* </pre>
*
* <code>string discriminator = 2 [json_name = "discriminator"];</code>
* @return The discriminator.
*/
java.lang.String getDiscriminator();
/**
* <pre>
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
* </pre>
*
* <code>string discriminator = 2 [json_name = "discriminator"];</code>
* @return The bytes for discriminator.
*/
com.google.protobuf.ByteString
getDiscriminatorBytes();
/**
* <pre>
* Relevant only for Schema "properties" definitions. Declares the property as
* "read only". This means that it MAY be sent as part of a response but MUST
* NOT be sent as part of the request. Properties marked as readOnly being
* true SHOULD NOT be in the required list of the defined schema. Default
* value is false.
* </pre>
*
* <code>bool read_only = 3 [json_name = "readOnly"];</code>
* @return The readOnly.
*/
boolean getReadOnly();
/**
* <pre>
* Additional external documentation for this schema.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"];</code>
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
* <pre>
* Additional external documentation for this schema.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"];</code>
* @return The externalDocs.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs();
/**
* <pre>
* Additional external documentation for this schema.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
/**
* <pre>
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
* </pre>
*
* <code>string example = 6 [json_name = "example"];</code>
* @return The example.
*/
java.lang.String getExample();
/**
* <pre>
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
* </pre>
*
* <code>string example = 6 [json_name = "example"];</code>
* @return The bytes for example.
*/
com.google.protobuf.ByteString
getExampleBytes();
}
@@ -0,0 +1,156 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
/**
* <pre>
* Scheme describes the schemes supported by the OpenAPI Swagger
* and Operation objects.
* </pre>
*
* Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.Scheme}
*/
public enum Scheme
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>UNKNOWN = 0;</code>
*/
UNKNOWN(0),
/**
* <code>HTTP = 1;</code>
*/
HTTP(1),
/**
* <code>HTTPS = 2;</code>
*/
HTTPS(2),
/**
* <code>WS = 3;</code>
*/
WS(3),
/**
* <code>WSS = 4;</code>
*/
WSS(4),
UNRECOGNIZED(-1),
;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Scheme.class.getName());
}
/**
* <code>UNKNOWN = 0;</code>
*/
public static final int UNKNOWN_VALUE = 0;
/**
* <code>HTTP = 1;</code>
*/
public static final int HTTP_VALUE = 1;
/**
* <code>HTTPS = 2;</code>
*/
public static final int HTTPS_VALUE = 2;
/**
* <code>WS = 3;</code>
*/
public static final int WS_VALUE = 3;
/**
* <code>WSS = 4;</code>
*/
public static final int WSS_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Scheme valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Scheme forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return HTTP;
case 2: return HTTPS;
case 3: return WS;
case 4: return WSS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<Scheme>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Scheme> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<Scheme>() {
public Scheme findValueByNumber(int number) {
return Scheme.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor().getEnumTypes().get(0);
}
private static final Scheme[] VALUES = values();
public static Scheme valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Scheme(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.Scheme)
}
@@ -0,0 +1,715 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
/**
* <pre>
* `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
*
* Lists the available scopes for an OAuth2 security scheme.
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes}
*/
public final class Scopes extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes)
ScopesOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
Scopes.class.getName());
}
// Use Scopes.newBuilder() to construct.
private Scopes(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private Scopes() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetScope();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class);
}
public static final int SCOPE_FIELD_NUMBER = 1;
private static final class ScopeDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> scope_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetScope() {
if (scope_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ScopeDefaultEntryHolder.defaultEntry);
}
return scope_;
}
public int getScopeCount() {
return internalGetScope().getMap().size();
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public boolean containsScope(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetScope().getMap().containsKey(key);
}
/**
* Use {@link #getScopeMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String> getScope() {
return getScopeMap();
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getScopeMap() {
return internalGetScope().getMap();
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getScopeOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetScope().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public java.lang.String getScopeOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetScope().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetScope(),
ScopeDefaultEntryHolder.defaultEntry,
1);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetScope().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
scope__ = ScopeDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, scope__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Scopes)) {
return super.equals(obj);
}
com.grpc.gateway.protoc_gen_openapiv2.options.Scopes other = (com.grpc.gateway.protoc_gen_openapiv2.options.Scopes) obj;
if (!internalGetScope().equals(
other.internalGetScope())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetScope().getMap().isEmpty()) {
hash = (37 * hash) + SCOPE_FIELD_NUMBER;
hash = (53 * hash) + internalGetScope().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
*
* Lists the available scopes for an OAuth2 security scheme.
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes)
com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetScope();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetMutableScope();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class);
}
// Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
internalGetMutableScope().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance();
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes build() {
com.grpc.gateway.protoc_gen_openapiv2.options.Scopes result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes buildPartial() {
com.grpc.gateway.protoc_gen_openapiv2.options.Scopes result = new com.grpc.gateway.protoc_gen_openapiv2.options.Scopes(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.scope_ = internalGetScope();
result.scope_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Scopes) {
return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Scopes)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes other) {
if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance()) return this;
internalGetMutableScope().mergeFrom(
other.internalGetScope());
bitField0_ |= 0x00000001;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
scope__ = input.readMessage(
ScopeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableScope().getMutableMap().put(
scope__.getKey(), scope__.getValue());
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> scope_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetScope() {
if (scope_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ScopeDefaultEntryHolder.defaultEntry);
}
return scope_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableScope() {
if (scope_ == null) {
scope_ = com.google.protobuf.MapField.newMapField(
ScopeDefaultEntryHolder.defaultEntry);
}
if (!scope_.isMutable()) {
scope_ = scope_.copy();
}
bitField0_ |= 0x00000001;
onChanged();
return scope_;
}
public int getScopeCount() {
return internalGetScope().getMap().size();
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public boolean containsScope(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetScope().getMap().containsKey(key);
}
/**
* Use {@link #getScopeMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String> getScope() {
return getScopeMap();
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getScopeMap() {
return internalGetScope().getMap();
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getScopeOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetScope().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
@java.lang.Override
public java.lang.String getScopeOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetScope().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearScope() {
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableScope().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
public Builder removeScope(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableScope().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableScope() {
bitField0_ |= 0x00000001;
return internalGetMutableScope().getMutableMap();
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
public Builder putScope(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableScope().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000001;
return this;
}
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
public Builder putAllScope(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableScope().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000001;
return this;
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes)
private static final com.grpc.gateway.protoc_gen_openapiv2.options.Scopes DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Scopes();
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Scopes>
PARSER = new com.google.protobuf.AbstractParser<Scopes>() {
@java.lang.Override
public Scopes parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<Scopes> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Scopes> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,70 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface ScopesOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Scopes)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
int getScopeCount();
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
boolean containsScope(
java.lang.String key);
/**
* Use {@link #getScopeMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String>
getScope();
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
java.util.Map<java.lang.String, java.lang.String>
getScopeMap();
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
/* nullable */
java.lang.String getScopeOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Maps between a name of a scope to a short description of it (as the value
* of the property).
* </pre>
*
* <code>map&lt;string, string&gt; scope = 1 [json_name = "scope"];</code>
*/
java.lang.String getScopeOrThrow(
java.lang.String key);
}
@@ -0,0 +1,753 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
/**
* <pre>
* `SecurityDefinitions` is a representation of OpenAPI v2 specification's
* Security Definitions object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
*
* A declaration of the security schemes available to be used in the
* specification. This does not enforce the security schemes on the operations
* and only serves to provide the relevant details for each scheme.
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions}
*/
public final class SecurityDefinitions extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)
SecurityDefinitionsOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
SecurityDefinitions.class.getName());
}
// Use SecurityDefinitions.newBuilder() to construct.
private SecurityDefinitions(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private SecurityDefinitions() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetSecurity();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class);
}
public static final int SECURITY_FIELD_NUMBER = 1;
private static final class SecurityDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme>newDefaultInstance(
com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security_;
private com.google.protobuf.MapField<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme>
internalGetSecurity() {
if (security_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SecurityDefaultEntryHolder.defaultEntry);
}
return security_;
}
public int getSecurityCount() {
return internalGetSecurity().getMap().size();
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public boolean containsSecurity(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetSecurity().getMap().containsKey(key);
}
/**
* Use {@link #getSecurityMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> getSecurity() {
return getSecurityMap();
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> getSecurityMap() {
return internalGetSecurity().getMap();
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public /* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault(
java.lang.String key,
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> map =
internalGetSecurity().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> map =
internalGetSecurity().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetSecurity(),
SecurityDefaultEntryHolder.defaultEntry,
1);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> entry
: internalGetSecurity().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme>
security__ = SecurityDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, security__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)) {
return super.equals(obj);
}
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other = (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) obj;
if (!internalGetSecurity().equals(
other.internalGetSecurity())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetSecurity().getMap().isEmpty()) {
hash = (37 * hash) + SECURITY_FIELD_NUMBER;
hash = (53 * hash) + internalGetSecurity().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* `SecurityDefinitions` is a representation of OpenAPI v2 specification's
* Security Definitions object.
*
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
*
* A declaration of the security schemes available to be used in the
* specification. This does not enforce the security schemes on the operations
* and only serves to provide the relevant details for each scheme.
* </pre>
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetSecurity();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetMutableSecurity();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class);
}
// Construct using com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
internalGetMutableSecurity().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() {
return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance();
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions build() {
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions buildPartial() {
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.security_ = internalGetSecurity().build(SecurityDefaultEntryHolder.defaultEntry);
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) {
return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other) {
if (other == com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance()) return this;
internalGetMutableSecurity().mergeFrom(
other.internalGetSecurity());
bitField0_ |= 0x00000001;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.MapEntry<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme>
security__ = input.readMessage(
SecurityDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableSecurity().ensureBuilderMap().put(
security__.getKey(), security__.getValue());
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private static final class SecurityConverter implements com.google.protobuf.MapFieldBuilder.Converter<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> {
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme build(com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder val) {
if (val instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { return (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) val; }
return ((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> defaultEntry() {
return SecurityDefaultEntryHolder.defaultEntry;
}
};
private static final SecurityConverter securityConverter = new SecurityConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder> security_;
private com.google.protobuf.MapFieldBuilder<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder>
internalGetSecurity() {
if (security_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(securityConverter);
}
return security_;
}
private com.google.protobuf.MapFieldBuilder<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder>
internalGetMutableSecurity() {
if (security_ == null) {
security_ = new com.google.protobuf.MapFieldBuilder<>(securityConverter);
}
bitField0_ |= 0x00000001;
onChanged();
return security_;
}
public int getSecurityCount() {
return internalGetSecurity().ensureBuilderMap().size();
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public boolean containsSecurity(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetSecurity().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getSecurityMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> getSecurity() {
return getSecurityMap();
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> getSecurityMap() {
return internalGetSecurity().getImmutableMap();
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public /* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault(
java.lang.String key,
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder> map = internalGetMutableSecurity().ensureBuilderMap();
return map.containsKey(key) ? securityConverter.build(map.get(key)) : defaultValue;
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder> map = internalGetMutableSecurity().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return securityConverter.build(map.get(key));
}
public Builder clearSecurity() {
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableSecurity().clear();
return this;
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
public Builder removeSecurity(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableSecurity().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme>
getMutableSecurity() {
bitField0_ |= 0x00000001;
return internalGetMutableSecurity().ensureMessageMap();
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
public Builder putSecurity(
java.lang.String key,
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableSecurity().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000001;
return this;
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
public Builder putAllSecurity(
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> values) {
for (java.util.Map.Entry<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableSecurity().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000001;
return this;
}
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder putSecurityBuilderIfAbsent(
java.lang.String key) {
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder> builderMap = internalGetMutableSecurity().ensureBuilderMap();
com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) {
entry = ((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) entry).toBuilder();
builderMap.put(key, entry);
}
return (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) entry;
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)
private static final com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions();
}
public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<SecurityDefinitions>
PARSER = new com.google.protobuf.AbstractParser<SecurityDefinitions>() {
@java.lang.Override
public SecurityDefinitions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<SecurityDefinitions> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<SecurityDefinitions> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,70 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface SecurityDefinitionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
int getSecurityCount();
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
boolean containsSecurity(
java.lang.String key);
/**
* Use {@link #getSecurityMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme>
getSecurity();
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme>
getSecurityMap();
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault(
java.lang.String key,
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue);
/**
* <pre>
* A single security scheme definition, mapping a "name" to the scheme it
* defines.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme&gt; security = 1 [json_name = "security"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow(
java.lang.String key);
}
@@ -0,0 +1,80 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface SecurityRequirementOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Each name must correspond to a security scheme which is declared in
* the Security Definitions. If the security scheme is of type "oauth2",
* then the value is a list of scope names required for the execution.
* For other security scheme types, the array MUST be empty.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue&gt; security_requirement = 1 [json_name = "securityRequirement"];</code>
*/
int getSecurityRequirementCount();
/**
* <pre>
* Each name must correspond to a security scheme which is declared in
* the Security Definitions. If the security scheme is of type "oauth2",
* then the value is a list of scope names required for the execution.
* For other security scheme types, the array MUST be empty.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue&gt; security_requirement = 1 [json_name = "securityRequirement"];</code>
*/
boolean containsSecurityRequirement(
java.lang.String key);
/**
* Use {@link #getSecurityRequirementMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue>
getSecurityRequirement();
/**
* <pre>
* Each name must correspond to a security scheme which is declared in
* the Security Definitions. If the security scheme is of type "oauth2",
* then the value is a list of scope names required for the execution.
* For other security scheme types, the array MUST be empty.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue&gt; security_requirement = 1 [json_name = "securityRequirement"];</code>
*/
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue>
getSecurityRequirementMap();
/**
* <pre>
* Each name must correspond to a security scheme which is declared in
* the Security Definitions. If the security scheme is of type "oauth2",
* then the value is a list of scope names required for the execution.
* For other security scheme types, the array MUST be empty.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue&gt; security_requirement = 1 [json_name = "securityRequirement"];</code>
*/
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault(
java.lang.String key,
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue);
/**
* <pre>
* Each name must correspond to a security scheme which is declared in
* the Security Definitions. If the security scheme is of type "oauth2",
* then the value is a list of scope names required for the execution.
* For other security scheme types, the array MUST be empty.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue&gt; security_requirement = 1 [json_name = "securityRequirement"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow(
java.lang.String key);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,262 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface SecuritySchemeOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The type of the security scheme. Valid values are "basic",
* "apiKey" or "oauth2".
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"];</code>
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
* <pre>
* The type of the security scheme. Valid values are "basic",
* "apiKey" or "oauth2".
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"];</code>
* @return The type.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType();
/**
* <pre>
* A short description for security scheme.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* A short description for security scheme.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* The name of the header or query parameter to be used.
* Valid for apiKey.
* </pre>
*
* <code>string name = 3 [json_name = "name"];</code>
* @return The name.
*/
java.lang.String getName();
/**
* <pre>
* The name of the header or query parameter to be used.
* Valid for apiKey.
* </pre>
*
* <code>string name = 3 [json_name = "name"];</code>
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <pre>
* The location of the API key. Valid values are "query" or
* "header".
* Valid for apiKey.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"];</code>
* @return The enum numeric value on the wire for in.
*/
int getInValue();
/**
* <pre>
* The location of the API key. Valid values are "query" or
* "header".
* Valid for apiKey.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"];</code>
* @return The in.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn();
/**
* <pre>
* The flow used by the OAuth2 security scheme. Valid values are
* "implicit", "password", "application" or "accessCode".
* Valid for oauth2.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"];</code>
* @return The enum numeric value on the wire for flow.
*/
int getFlowValue();
/**
* <pre>
* The flow used by the OAuth2 security scheme. Valid values are
* "implicit", "password", "application" or "accessCode".
* Valid for oauth2.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"];</code>
* @return The flow.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow();
/**
* <pre>
* The authorization URL to be used for this flow. This SHOULD be in
* the form of a URL.
* Valid for oauth2/implicit and oauth2/accessCode.
* </pre>
*
* <code>string authorization_url = 6 [json_name = "authorizationUrl"];</code>
* @return The authorizationUrl.
*/
java.lang.String getAuthorizationUrl();
/**
* <pre>
* The authorization URL to be used for this flow. This SHOULD be in
* the form of a URL.
* Valid for oauth2/implicit and oauth2/accessCode.
* </pre>
*
* <code>string authorization_url = 6 [json_name = "authorizationUrl"];</code>
* @return The bytes for authorizationUrl.
*/
com.google.protobuf.ByteString
getAuthorizationUrlBytes();
/**
* <pre>
* The token URL to be used for this flow. This SHOULD be in the
* form of a URL.
* Valid for oauth2/password, oauth2/application and oauth2/accessCode.
* </pre>
*
* <code>string token_url = 7 [json_name = "tokenUrl"];</code>
* @return The tokenUrl.
*/
java.lang.String getTokenUrl();
/**
* <pre>
* The token URL to be used for this flow. This SHOULD be in the
* form of a URL.
* Valid for oauth2/password, oauth2/application and oauth2/accessCode.
* </pre>
*
* <code>string token_url = 7 [json_name = "tokenUrl"];</code>
* @return The bytes for tokenUrl.
*/
com.google.protobuf.ByteString
getTokenUrlBytes();
/**
* <pre>
* The available scopes for the OAuth2 security scheme.
* Valid for oauth2.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"];</code>
* @return Whether the scopes field is set.
*/
boolean hasScopes();
/**
* <pre>
* The available scopes for the OAuth2 security scheme.
* Valid for oauth2.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"];</code>
* @return The scopes.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes();
/**
* <pre>
* The available scopes for the OAuth2 security scheme.
* Valid for oauth2.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 9 [json_name = "extensions"];</code>
*/
int getExtensionsCount();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 9 [json_name = "extensions"];</code>
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensions();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 9 [json_name = "extensions"];</code>
*/
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensionsMap();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 9 [json_name = "extensions"];</code>
*/
/* nullable */
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Value defaultValue);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 9 [json_name = "extensions"];</code>
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,569 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface SwaggerOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Swagger)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
* </pre>
*
* <code>string swagger = 1 [json_name = "swagger"];</code>
* @return The swagger.
*/
java.lang.String getSwagger();
/**
* <pre>
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
* </pre>
*
* <code>string swagger = 1 [json_name = "swagger"];</code>
* @return The bytes for swagger.
*/
com.google.protobuf.ByteString
getSwaggerBytes();
/**
* <pre>
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"];</code>
* @return Whether the info field is set.
*/
boolean hasInfo();
/**
* <pre>
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"];</code>
* @return The info.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Info getInfo();
/**
* <pre>
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder();
/**
* <pre>
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
* </pre>
*
* <code>string host = 3 [json_name = "host"];</code>
* @return The host.
*/
java.lang.String getHost();
/**
* <pre>
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
* </pre>
*
* <code>string host = 3 [json_name = "host"];</code>
* @return The bytes for host.
*/
com.google.protobuf.ByteString
getHostBytes();
/**
* <pre>
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
* </pre>
*
* <code>string base_path = 4 [json_name = "basePath"];</code>
* @return The basePath.
*/
java.lang.String getBasePath();
/**
* <pre>
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
* </pre>
*
* <code>string base_path = 4 [json_name = "basePath"];</code>
* @return The bytes for basePath.
*/
com.google.protobuf.ByteString
getBasePathBytes();
/**
* <pre>
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"];</code>
* @return A list containing the schemes.
*/
java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.Scheme> getSchemesList();
/**
* <pre>
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"];</code>
* @return The count of schemes.
*/
int getSchemesCount();
/**
* <pre>
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"];</code>
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index);
/**
* <pre>
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"];</code>
* @return A list containing the enum numeric values on the wire for schemes.
*/
java.util.List<java.lang.Integer>
getSchemesValueList();
/**
* <pre>
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"];</code>
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
int getSchemesValue(int index);
/**
* <pre>
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @return A list containing the consumes.
*/
java.util.List<java.lang.String>
getConsumesList();
/**
* <pre>
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @return The count of consumes.
*/
int getConsumesCount();
/**
* <pre>
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
java.lang.String getConsumes(int index);
/**
* <pre>
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string consumes = 6 [json_name = "consumes"];</code>
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
com.google.protobuf.ByteString
getConsumesBytes(int index);
/**
* <pre>
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @return A list containing the produces.
*/
java.util.List<java.lang.String>
getProducesList();
/**
* <pre>
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @return The count of produces.
*/
int getProducesCount();
/**
* <pre>
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @param index The index of the element to return.
* @return The produces at the given index.
*/
java.lang.String getProduces(int index);
/**
* <pre>
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
* </pre>
*
* <code>repeated string produces = 7 [json_name = "produces"];</code>
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
com.google.protobuf.ByteString
getProducesBytes(int index);
/**
* <pre>
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 10 [json_name = "responses"];</code>
*/
int getResponsesCount();
/**
* <pre>
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 10 [json_name = "responses"];</code>
*/
boolean containsResponses(
java.lang.String key);
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response>
getResponses();
/**
* <pre>
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 10 [json_name = "responses"];</code>
*/
java.util.Map<java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response>
getResponsesMap();
/**
* <pre>
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 10 [json_name = "responses"];</code>
*/
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault(
java.lang.String key,
/* nullable */
com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue);
/**
* <pre>
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
* </pre>
*
* <code>map&lt;string, .grpc.gateway.protoc_gen_openapiv2.options.Response&gt; responses = 10 [json_name = "responses"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow(
java.lang.String key);
/**
* <pre>
* Security scheme definitions that can be used across the specification.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"];</code>
* @return Whether the securityDefinitions field is set.
*/
boolean hasSecurityDefinitions();
/**
* <pre>
* Security scheme definitions that can be used across the specification.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"];</code>
* @return The securityDefinitions.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions();
/**
* <pre>
* Security scheme definitions that can be used across the specification.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder();
/**
* <pre>
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement>
getSecurityList();
/**
* <pre>
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index);
/**
* <pre>
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
int getSecurityCount();
/**
* <pre>
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
java.util.List<? extends com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>
getSecurityOrBuilderList();
/**
* <pre>
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index);
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"];</code>
*/
java.util.List<com.grpc.gateway.protoc_gen_openapiv2.options.Tag>
getTagsList();
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index);
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"];</code>
*/
int getTagsCount();
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"];</code>
*/
java.util.List<? extends com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder>
getTagsOrBuilderList();
/**
* <pre>
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
* </pre>
*
* <code>repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder(
int index);
/**
* <pre>
* Additional external documentation.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"];</code>
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
* <pre>
* Additional external documentation.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"];</code>
* @return The externalDocs.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs();
/**
* <pre>
* Additional external documentation.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 15 [json_name = "extensions"];</code>
*/
int getExtensionsCount();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 15 [json_name = "extensions"];</code>
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensions();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 15 [json_name = "extensions"];</code>
*/
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensionsMap();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 15 [json_name = "extensions"];</code>
*/
/* nullable */
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Value defaultValue);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 15 [json_name = "extensions"];</code>
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,148 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: protoc-gen-openapiv2/options/openapiv2.proto
// Protobuf Java Version: 4.28.2
package com.grpc.gateway.protoc_gen_openapiv2.options;
public interface TagOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Tag)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The name of the tag. Use it to allow override of the name of a
* global Tag object, then use that name to reference the tag throughout the
* OpenAPI file.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The name.
*/
java.lang.String getName();
/**
* <pre>
* The name of the tag. Use it to allow override of the name of a
* global Tag object, then use that name to reference the tag throughout the
* OpenAPI file.
* </pre>
*
* <code>string name = 1 [json_name = "name"];</code>
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <pre>
* A short description for the tag. GFM syntax can be used for rich text
* representation.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The description.
*/
java.lang.String getDescription();
/**
* <pre>
* A short description for the tag. GFM syntax can be used for rich text
* representation.
* </pre>
*
* <code>string description = 2 [json_name = "description"];</code>
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* <pre>
* Additional external documentation for this tag.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"];</code>
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
* <pre>
* Additional external documentation for this tag.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"];</code>
* @return The externalDocs.
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs();
/**
* <pre>
* Additional external documentation for this tag.
* </pre>
*
* <code>.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"];</code>
*/
com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 4 [json_name = "extensions"];</code>
*/
int getExtensionsCount();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 4 [json_name = "extensions"];</code>
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensions();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 4 [json_name = "extensions"];</code>
*/
java.util.Map<java.lang.String, com.google.protobuf.Value>
getExtensionsMap();
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 4 [json_name = "extensions"];</code>
*/
/* nullable */
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
/* nullable */
com.google.protobuf.Value defaultValue);
/**
* <pre>
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
* </pre>
*
* <code>map&lt;string, .google.protobuf.Value&gt; extensions = 4 [json_name = "extensions"];</code>
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
@@ -23,17 +23,17 @@ public enum ChannelType {
/**
* A chat room which can be created dynamically with a name.
*/
ROOM(0),
ROOM(1),
/**
* A private chat between two users.
*/
DIRECT_MESSAGE(1),
DIRECT_MESSAGE(2),
/**
* A chat within a group on the server.
*/
GROUP(2);
GROUP(3);
private final int value;
ChannelType(int value) {
@@ -37,6 +37,8 @@ public interface Client {
/**
* Disconnects the client. This function kills all outgoing exchanges immediately without waiting.
* @deprecated
* This method is deprecated. <p> Use {@link Client#disconnect(long, TimeUnit)} instead.
*/
void disconnect();
@@ -210,22 +210,22 @@ public class DefaultClient implements Client {
@Override
public SocketClient createSocket(final int port, final int socketTimeoutMs) {
return new WebSocketClient(host, port, ssl, socketTimeoutMs, WebSocketClient.DEFAULT_PING_MS, this.trace, Executors.newSingleThreadExecutor());
return new WebSocketClient(host, port, ssl, socketTimeoutMs, WebSocketClient.DEFAULT_PING_MS, this.trace, null);
}
@Override
public SocketClient createSocket(final String host, final int port, final boolean ssl) {
return new WebSocketClient(host, port, ssl, WebSocketClient.DEFAULT_TIMEOUT_MS, WebSocketClient.DEFAULT_PING_MS, this.trace, Executors.newSingleThreadExecutor());
return new WebSocketClient(host, port, ssl, WebSocketClient.DEFAULT_TIMEOUT_MS, WebSocketClient.DEFAULT_PING_MS, this.trace, null);
}
@Override
public SocketClient createSocket(final String host, final int port, final boolean ssl, final int socketTimeoutMs) {
return new WebSocketClient(host, port, ssl, socketTimeoutMs, WebSocketClient.DEFAULT_PING_MS, this.trace, Executors.newSingleThreadExecutor());
return new WebSocketClient(host, port, ssl, socketTimeoutMs, WebSocketClient.DEFAULT_PING_MS, this.trace, null);
}
@Override
public SocketClient createSocket(final String host, final int port, final boolean ssl, final int socketTimeoutMs, final int socketPingMs) {
return new WebSocketClient(host, port, ssl, socketTimeoutMs, socketPingMs, this.trace, Executors.newSingleThreadExecutor());
return new WebSocketClient(host, port, ssl, socketTimeoutMs, socketPingMs, this.trace, null);
}
@Override
@@ -1791,7 +1791,7 @@ public class DefaultClient implements Client {
@Override
public ListenableFuture<Empty> logoutSession(@NonNull final Session session) {
return autoRefreshSession(session, getStub(session).sessionLogout(SessionLogoutRequest.newBuilder().setToken(session.getAuthToken()).setRefreshToken(session.getRefreshToken()).build()));
return getStub(session).sessionLogout(SessionLogoutRequest.newBuilder().setToken(session.getAuthToken()).setRefreshToken(session.getRefreshToken()).build());
}
@Override
@@ -24,6 +24,7 @@ import lombok.NonNull;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* A socket connection to the server.
@@ -48,11 +49,18 @@ public interface SocketClient {
/**
* Close the connection with the server.
* @deprecated
* This method is deprecated. <p> Use {@link SocketClient#disconnectSocket()} instead.
*
* @return A close future.
*/
ListenableFuture<Boolean> disconnect();
/**
* Close the connection with the server. This is an asynchronous call, and you should subscribe to OnClose callback to act on this.
*/
void disconnectSocket();
/**
* Join a chat channel on the server.
*
@@ -27,9 +27,6 @@ import com.google.protobuf.Timestamp;
import com.google.type.Date;
import com.heroiclabs.nakama.api.NotificationList;
import com.heroiclabs.nakama.api.Rpc;
import com.heroiclabs.nakama.rtapi.PartyJoin;
import com.heroiclabs.nakama.rtapi.PartyJoinRequestList;
import com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd;
import com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
@@ -43,6 +40,7 @@ import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
/**
@@ -77,10 +75,11 @@ public class WebSocketClient implements SocketClient {
private final int port;
private final boolean ssl;
private final boolean trace;
private final OkHttpClient client;
private final Map<String, SettableFuture<?>> collationIds;
private final boolean shouldShutdownThreadExecService;
private final OkHttpClient.Builder clientBuilder;
private ExecutorService listenerThreadExec;
private WebSocket socket;
private final ExecutorService listenerThreadExec;
WebSocketClient(@NonNull final String host, final int port, final boolean ssl,
final int socketTimeoutMs, final int socketPingMs, final boolean trace, ExecutorService listenerThreadExec) {
@@ -89,14 +88,19 @@ public class WebSocketClient implements SocketClient {
this.ssl = ssl;
this.trace = trace;
this.collationIds = new ConcurrentHashMap<>();
this.listenerThreadExec = listenerThreadExec;
if (listenerThreadExec != null) {
this.listenerThreadExec = listenerThreadExec;
this.shouldShutdownThreadExecService = false;
} else {
this.listenerThreadExec = Executors.newSingleThreadExecutor();
this.shouldShutdownThreadExecService = true;
}
client = new OkHttpClient.Builder()
clientBuilder = new OkHttpClient.Builder()
.connectTimeout(socketTimeoutMs, TimeUnit.MILLISECONDS)
.readTimeout(socketTimeoutMs, TimeUnit.MILLISECONDS)
.writeTimeout(socketTimeoutMs, TimeUnit.MILLISECONDS)
.pingInterval(socketPingMs, TimeUnit.SECONDS)
.build();
.pingInterval(socketPingMs, TimeUnit.SECONDS);
}
@Override
@@ -107,7 +111,7 @@ public class WebSocketClient implements SocketClient {
@Override
public ListenableFuture<Session> connect(@NonNull final Session session, @NonNull final SocketListener listener, final boolean createStatus) {
if (socket != null) {
return Futures.immediateFailedFuture(new DefaultError("Client is already connected"));
return Futures.immediateFailedFuture(new DefaultError("Socket is already connected"));
}
final String url = new HttpUrl.Builder()
@@ -133,8 +137,14 @@ public class WebSocketClient implements SocketClient {
}
private ListenableFuture<Session> createWebsocket(@NonNull final Session session, @NonNull final SocketListener listener, @NonNull final Request request) {
if (this.listenerThreadExec == null || this.listenerThreadExec.isShutdown() || this.listenerThreadExec.isTerminated()) {
// in case of previously closed/failed socket.
this.listenerThreadExec = Executors.newSingleThreadExecutor();
}
final SettableFuture<Session> connectFuture = SettableFuture.create();
final Object lock = this;
final OkHttpClient client = clientBuilder.build();
socket = client.newWebSocket(request, new WebSocketListener() {
@Override
public void onOpen(final WebSocket webSocket, final Response response) {
@@ -146,7 +156,7 @@ public class WebSocketClient implements SocketClient {
@Override
public void onMessage(final WebSocket webSocket, final ByteString bytes) {
super.onMessage(webSocket, bytes);
// No text messages are expected.
// No binary messages are expected.
log.warn("Unexpected binary message from server: " + bytes.base64());
}
@@ -293,32 +303,54 @@ public class WebSocketClient implements SocketClient {
@Override
public void onClosed(final WebSocket webSocket, final int code, final String reason) {
super.onClosed(webSocket, code, reason);
listener.onDisconnect(null);
// Graceful socket disconnect is complete, clean up.
synchronized (lock) {
socket.cancel();
socket = null;
collationIds.clear();
if (!connectFuture.isCancelled() && !connectFuture.isDone()) {
connectFuture.setException(new Throwable("Socket closed."));
}
if (shouldShutdownThreadExecService) {
listenerThreadExec.shutdown();
}
// clean up OkHttp Websocket resources.
client.connectionPool().evictAll();
client.dispatcher().executorService().shutdown();
// setup new executor service in case of reconnections.
clientBuilder.setDispatcher$okhttp(new Dispatcher());
}
listener.onDisconnect(null);
}
@Override
public void onFailure(final WebSocket webSocket, final Throwable t, final Response response) {
super.onFailure(webSocket, t, response);
listener.onDisconnect(t);
// Socket has failed and is no longer connected, clean up.
synchronized (lock) {
socket.cancel();
socket = null;
collationIds.clear();
if (!connectFuture.isCancelled() && !connectFuture.isDone()) {
connectFuture.setException(t);
}
}
listener.onDisconnect(t);
if (shouldShutdownThreadExecService) {
listenerThreadExec.shutdown();
}
// clean up OkHttp Websocket resources.
client.connectionPool().evictAll();
client.dispatcher().executorService().shutdown();
// setup new executor service in case of reconnections.
clientBuilder.setDispatcher$okhttp(new Dispatcher());
}
}
});
return connectFuture;
@@ -330,12 +362,23 @@ public class WebSocketClient implements SocketClient {
// Returns true if a shutdown was initiated, false if already shutting down or disconnected.
// Either result is acceptable here.
// Socket reference will be set to null when disconnect is completed.
// Don't nullify the socket at this stage as we'll need to have the OnClose called.
socket.close(1000, null);
socket = null;
}
return Futures.immediateFuture(true);
}
@Override
public synchronized void disconnectSocket() {
if (socket != null) {
// Returns true if a shutdown was initiated, false if already shutting down or disconnected.
// Either result is acceptable here.
// Socket reference will be set to null when disconnect is completed.
// Don't nullify the socket at this stage as we'll need to have the OnClose called.
socket.close(1000, null);
}
}
@Override
public ListenableFuture<Channel> joinChat(@NonNull final String target, @NonNull final ChannelType type) {
final ChannelJoinMessage msg = new ChannelJoinMessage(target, type.getValue());
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
/**
* <pre>
* Send a Apple Sign In token to the server. Used with authenticate/link/unlink.
* </pre>
*
* Protobuf type {@code nakama.api.AccountApple}
*/
public final class AccountApple extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountApple)
AccountAppleOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountApple.class.getName());
}
// Use AccountApple.newBuilder() to construct.
private AccountApple(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountApple() {
token_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountApple.class, com.heroiclabs.nakama.api.AccountApple.Builder.class);
}
public static final int TOKEN_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object token_ = "";
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
@java.lang.Override
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
}
}
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, token_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountApple)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountApple other = (com.heroiclabs.nakama.api.AccountApple) obj;
if (!getToken()
.equals(other.getToken())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountApple parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountApple parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountApple parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountApple prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Send a Apple Sign In token to the server. Used with authenticate/link/unlink.
* </pre>
*
* Protobuf type {@code nakama.api.AccountApple}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountApple)
com.heroiclabs.nakama.api.AccountAppleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountApple.class, com.heroiclabs.nakama.api.AccountApple.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountApple.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
token_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountApple getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountApple.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountApple build() {
com.heroiclabs.nakama.api.AccountApple result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountApple buildPartial() {
com.heroiclabs.nakama.api.AccountApple result = new com.heroiclabs.nakama.api.AccountApple(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountApple result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.token_ = token_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountApple) {
return mergeFrom((com.heroiclabs.nakama.api.AccountApple)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountApple other) {
if (other == com.heroiclabs.nakama.api.AccountApple.getDefaultInstance()) return this;
if (!other.getToken().isEmpty()) {
token_ = other.token_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
token_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object token_ = "";
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The token to set.
* @return This builder for chaining.
*/
public Builder setToken(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return This builder for chaining.
*/
public Builder clearToken() {
token_ = getDefaultInstance().getToken();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The bytes for token to set.
* @return This builder for chaining.
*/
public Builder setTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountApple)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountApple)
private static final com.heroiclabs.nakama.api.AccountApple DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountApple();
}
public static com.heroiclabs.nakama.api.AccountApple getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountApple>
PARSER = new com.google.protobuf.AbstractParser<AccountApple>() {
@java.lang.Override
public AccountApple parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountApple> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountApple> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountApple getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountAppleOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountApple)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
java.lang.String getToken();
/**
* <pre>
* The ID token received from Apple to validate.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
com.google.protobuf.ByteString
getTokenBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountCustom)
AccountCustomOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountCustom.class.getName());
}
// Use AccountCustom.newBuilder() to construct.
private AccountCustom(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountCustom() {
id_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountCustom.class, com.heroiclabs.nakama.api.AccountCustom.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountCustom)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountCustom other = (com.heroiclabs.nakama.api.AccountCustom) obj;
if (!getId()
.equals(other.getId())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountCustom parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountCustom parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountCustom parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountCustom parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountCustom parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountCustom parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountCustom parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountCustom parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountCustom parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountCustom prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <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.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountCustom)
com.heroiclabs.nakama.api.AccountCustomOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountCustom.class, com.heroiclabs.nakama.api.AccountCustom.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountCustom.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountCustom getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountCustom build() {
com.heroiclabs.nakama.api.AccountCustom result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountCustom buildPartial() {
com.heroiclabs.nakama.api.AccountCustom result = new com.heroiclabs.nakama.api.AccountCustom(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountCustom result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountCustom) {
return mergeFrom((com.heroiclabs.nakama.api.AccountCustom)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountCustom other) {
if (other == com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountCustom)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountCustom)
private static final com.heroiclabs.nakama.api.AccountCustom DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountCustom();
}
public static com.heroiclabs.nakama.api.AccountCustom getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountCustom>
PARSER = new com.google.protobuf.AbstractParser<AccountCustom>() {
@java.lang.Override
public AccountCustom parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountCustom> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountCustom> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountCustom getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountCustomOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountCustom)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
java.lang.String getId();
/**
* <pre>
* A custom identifier.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountDevice)
AccountDeviceOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountDevice.class.getName());
}
// Use AccountDevice.newBuilder() to construct.
private AccountDevice(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountDevice() {
id_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountDevice.class, com.heroiclabs.nakama.api.AccountDevice.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountDevice)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountDevice other = (com.heroiclabs.nakama.api.AccountDevice) obj;
if (!getId()
.equals(other.getId())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountDevice parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountDevice parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountDevice parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountDevice parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountDevice parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountDevice parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountDevice parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountDevice parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountDevice parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountDevice prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <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.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountDevice)
com.heroiclabs.nakama.api.AccountDeviceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountDevice.class, com.heroiclabs.nakama.api.AccountDevice.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountDevice.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountDevice getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountDevice build() {
com.heroiclabs.nakama.api.AccountDevice result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountDevice buildPartial() {
com.heroiclabs.nakama.api.AccountDevice result = new com.heroiclabs.nakama.api.AccountDevice(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountDevice result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountDevice) {
return mergeFrom((com.heroiclabs.nakama.api.AccountDevice)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountDevice other) {
if (other == com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountDevice)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountDevice)
private static final com.heroiclabs.nakama.api.AccountDevice DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountDevice();
}
public static com.heroiclabs.nakama.api.AccountDevice getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountDevice>
PARSER = new com.google.protobuf.AbstractParser<AccountDevice>() {
@java.lang.Override
public AccountDevice parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountDevice> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountDevice> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountDevice getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountDeviceOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountDevice)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
java.lang.String getId();
/**
* <pre>
* A device identifier. Should be obtained by a platform-specific device API.
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,105 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountEmailOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountEmail)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* A valid RFC-5322 email address.
* </pre>
*
* <code>string email = 1 [json_name = "email"];</code>
* @return The email.
*/
java.lang.String getEmail();
/**
* <pre>
* A valid RFC-5322 email address.
* </pre>
*
* <code>string email = 1 [json_name = "email"];</code>
* @return The bytes for email.
*/
com.google.protobuf.ByteString
getEmailBytes();
/**
* <pre>
* A password for the user account.
* </pre>
*
* <code>string password = 2 [json_name = "password"];</code>
* @return The password.
*/
java.lang.String getPassword();
/**
* <pre>
* A password for the user account.
* </pre>
*
* <code>string password = 2 [json_name = "password"];</code>
* @return The bytes for password.
*/
com.google.protobuf.ByteString
getPasswordBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 3 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 3 [json_name = "vars"];</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&lt;string, string&gt; vars = 3 [json_name = "vars"];</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&lt;string, string&gt; vars = 3 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 3 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountFacebook)
AccountFacebookOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountFacebook.class.getName());
}
// Use AccountFacebook.newBuilder() to construct.
private AccountFacebook(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountFacebook() {
token_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountFacebook.class, com.heroiclabs.nakama.api.AccountFacebook.Builder.class);
}
public static final int TOKEN_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object token_ = "";
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
@java.lang.Override
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
}
}
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, token_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountFacebook)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountFacebook other = (com.heroiclabs.nakama.api.AccountFacebook) obj;
if (!getToken()
.equals(other.getToken())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountFacebook prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <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.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountFacebook)
com.heroiclabs.nakama.api.AccountFacebookOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountFacebook.class, com.heroiclabs.nakama.api.AccountFacebook.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountFacebook.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
token_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebook getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebook build() {
com.heroiclabs.nakama.api.AccountFacebook result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebook buildPartial() {
com.heroiclabs.nakama.api.AccountFacebook result = new com.heroiclabs.nakama.api.AccountFacebook(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountFacebook result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.token_ = token_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountFacebook) {
return mergeFrom((com.heroiclabs.nakama.api.AccountFacebook)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountFacebook other) {
if (other == com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) return this;
if (!other.getToken().isEmpty()) {
token_ = other.token_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
token_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object token_ = "";
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The token to set.
* @return This builder for chaining.
*/
public Builder setToken(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return This builder for chaining.
*/
public Builder clearToken() {
token_ = getDefaultInstance().getToken();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The bytes for token to set.
* @return This builder for chaining.
*/
public Builder setTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountFacebook)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountFacebook)
private static final com.heroiclabs.nakama.api.AccountFacebook DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountFacebook();
}
public static com.heroiclabs.nakama.api.AccountFacebook getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountFacebook>
PARSER = new com.google.protobuf.AbstractParser<AccountFacebook>() {
@java.lang.Override
public AccountFacebook parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountFacebook> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountFacebook> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebook getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
/**
* <pre>
* Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.
* </pre>
*
* Protobuf type {@code nakama.api.AccountFacebookInstantGame}
*/
public final class AccountFacebookInstantGame extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountFacebookInstantGame)
AccountFacebookInstantGameOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountFacebookInstantGame.class.getName());
}
// Use AccountFacebookInstantGame.newBuilder() to construct.
private AccountFacebookInstantGame(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountFacebookInstantGame() {
signedPlayerInfo_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountFacebookInstantGame.class, com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder.class);
}
public static final int SIGNED_PLAYER_INFO_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object signedPlayerInfo_ = "";
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @return The signedPlayerInfo.
*/
@java.lang.Override
public java.lang.String getSignedPlayerInfo() {
java.lang.Object ref = signedPlayerInfo_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
signedPlayerInfo_ = s;
return s;
}
}
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @return The bytes for signedPlayerInfo.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSignedPlayerInfoBytes() {
java.lang.Object ref = signedPlayerInfo_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
signedPlayerInfo_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedPlayerInfo_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, signedPlayerInfo_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedPlayerInfo_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, signedPlayerInfo_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountFacebookInstantGame)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountFacebookInstantGame other = (com.heroiclabs.nakama.api.AccountFacebookInstantGame) obj;
if (!getSignedPlayerInfo()
.equals(other.getSignedPlayerInfo())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SIGNED_PLAYER_INFO_FIELD_NUMBER;
hash = (53 * hash) + getSignedPlayerInfo().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountFacebookInstantGame prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.
* </pre>
*
* Protobuf type {@code nakama.api.AccountFacebookInstantGame}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountFacebookInstantGame)
com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountFacebookInstantGame.class, com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountFacebookInstantGame.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
signedPlayerInfo_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebookInstantGame getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebookInstantGame build() {
com.heroiclabs.nakama.api.AccountFacebookInstantGame result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebookInstantGame buildPartial() {
com.heroiclabs.nakama.api.AccountFacebookInstantGame result = new com.heroiclabs.nakama.api.AccountFacebookInstantGame(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountFacebookInstantGame result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.signedPlayerInfo_ = signedPlayerInfo_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountFacebookInstantGame) {
return mergeFrom((com.heroiclabs.nakama.api.AccountFacebookInstantGame)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountFacebookInstantGame other) {
if (other == com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance()) return this;
if (!other.getSignedPlayerInfo().isEmpty()) {
signedPlayerInfo_ = other.signedPlayerInfo_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
signedPlayerInfo_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object signedPlayerInfo_ = "";
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @return The signedPlayerInfo.
*/
public java.lang.String getSignedPlayerInfo() {
java.lang.Object ref = signedPlayerInfo_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
signedPlayerInfo_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @return The bytes for signedPlayerInfo.
*/
public com.google.protobuf.ByteString
getSignedPlayerInfoBytes() {
java.lang.Object ref = signedPlayerInfo_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
signedPlayerInfo_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @param value The signedPlayerInfo to set.
* @return This builder for chaining.
*/
public Builder setSignedPlayerInfo(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
signedPlayerInfo_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @return This builder for chaining.
*/
public Builder clearSignedPlayerInfo() {
signedPlayerInfo_ = getDefaultInstance().getSignedPlayerInfo();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @param value The bytes for signedPlayerInfo to set.
* @return This builder for chaining.
*/
public Builder setSignedPlayerInfoBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
signedPlayerInfo_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountFacebookInstantGame)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountFacebookInstantGame)
private static final com.heroiclabs.nakama.api.AccountFacebookInstantGame DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountFacebookInstantGame();
}
public static com.heroiclabs.nakama.api.AccountFacebookInstantGame getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountFacebookInstantGame>
PARSER = new com.google.protobuf.AbstractParser<AccountFacebookInstantGame>() {
@java.lang.Override
public AccountFacebookInstantGame parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountFacebookInstantGame> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountFacebookInstantGame> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountFacebookInstantGame getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountFacebookInstantGameOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountFacebookInstantGame)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @return The signedPlayerInfo.
*/
java.lang.String getSignedPlayerInfo();
/**
* <pre>
* The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
* </pre>
*
* <code>string signed_player_info = 1 [json_name = "signedPlayerInfo"];</code>
* @return The bytes for signedPlayerInfo.
*/
com.google.protobuf.ByteString
getSignedPlayerInfoBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountFacebookOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountFacebook)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
java.lang.String getToken();
/**
* <pre>
* The OAuth token received from Facebook to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
com.google.protobuf.ByteString
getTokenBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,175 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountGameCenterOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountGameCenter)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Player ID (generated by GameCenter).
* </pre>
*
* <code>string player_id = 1 [json_name = "playerId"];</code>
* @return The playerId.
*/
java.lang.String getPlayerId();
/**
* <pre>
* Player ID (generated by GameCenter).
* </pre>
*
* <code>string player_id = 1 [json_name = "playerId"];</code>
* @return The bytes for playerId.
*/
com.google.protobuf.ByteString
getPlayerIdBytes();
/**
* <pre>
* Bundle ID (generated by GameCenter).
* </pre>
*
* <code>string bundle_id = 2 [json_name = "bundleId"];</code>
* @return The bundleId.
*/
java.lang.String getBundleId();
/**
* <pre>
* Bundle ID (generated by GameCenter).
* </pre>
*
* <code>string bundle_id = 2 [json_name = "bundleId"];</code>
* @return The bytes for bundleId.
*/
com.google.protobuf.ByteString
getBundleIdBytes();
/**
* <pre>
* Time since UNIX epoch when the signature was created.
* </pre>
*
* <code>int64 timestamp_seconds = 3 [json_name = "timestampSeconds"];</code>
* @return The timestampSeconds.
*/
long getTimestampSeconds();
/**
* <pre>
* A random "NSString" used to compute the hash and keep it randomized.
* </pre>
*
* <code>string salt = 4 [json_name = "salt"];</code>
* @return The salt.
*/
java.lang.String getSalt();
/**
* <pre>
* A random "NSString" used to compute the hash and keep it randomized.
* </pre>
*
* <code>string salt = 4 [json_name = "salt"];</code>
* @return The bytes for salt.
*/
com.google.protobuf.ByteString
getSaltBytes();
/**
* <pre>
* The verification signature data generated.
* </pre>
*
* <code>string signature = 5 [json_name = "signature"];</code>
* @return The signature.
*/
java.lang.String getSignature();
/**
* <pre>
* The verification signature data generated.
* </pre>
*
* <code>string signature = 5 [json_name = "signature"];</code>
* @return The bytes for signature.
*/
com.google.protobuf.ByteString
getSignatureBytes();
/**
* <pre>
* The URL for the public encryption key.
* </pre>
*
* <code>string public_key_url = 6 [json_name = "publicKeyUrl"];</code>
* @return The publicKeyUrl.
*/
java.lang.String getPublicKeyUrl();
/**
* <pre>
* The URL for the public encryption key.
* </pre>
*
* <code>string public_key_url = 6 [json_name = "publicKeyUrl"];</code>
* @return The bytes for publicKeyUrl.
*/
com.google.protobuf.ByteString
getPublicKeyUrlBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 7 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 7 [json_name = "vars"];</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&lt;string, string&gt; vars = 7 [json_name = "vars"];</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&lt;string, string&gt; vars = 7 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 7 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountGoogle)
AccountGoogleOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountGoogle.class.getName());
}
// Use AccountGoogle.newBuilder() to construct.
private AccountGoogle(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountGoogle() {
token_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountGoogle.class, com.heroiclabs.nakama.api.AccountGoogle.Builder.class);
}
public static final int TOKEN_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object token_ = "";
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
@java.lang.Override
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
}
}
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, token_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountGoogle)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountGoogle other = (com.heroiclabs.nakama.api.AccountGoogle) obj;
if (!getToken()
.equals(other.getToken())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountGoogle prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <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.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountGoogle)
com.heroiclabs.nakama.api.AccountGoogleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountGoogle.class, com.heroiclabs.nakama.api.AccountGoogle.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountGoogle.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
token_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountGoogle getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountGoogle build() {
com.heroiclabs.nakama.api.AccountGoogle result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountGoogle buildPartial() {
com.heroiclabs.nakama.api.AccountGoogle result = new com.heroiclabs.nakama.api.AccountGoogle(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountGoogle result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.token_ = token_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountGoogle) {
return mergeFrom((com.heroiclabs.nakama.api.AccountGoogle)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountGoogle other) {
if (other == com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance()) return this;
if (!other.getToken().isEmpty()) {
token_ = other.token_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
token_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object token_ = "";
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The token to set.
* @return This builder for chaining.
*/
public Builder setToken(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return This builder for chaining.
*/
public Builder clearToken() {
token_ = getDefaultInstance().getToken();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The bytes for token to set.
* @return This builder for chaining.
*/
public Builder setTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountGoogle)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountGoogle)
private static final com.heroiclabs.nakama.api.AccountGoogle DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountGoogle();
}
public static com.heroiclabs.nakama.api.AccountGoogle getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountGoogle>
PARSER = new com.google.protobuf.AbstractParser<AccountGoogle>() {
@java.lang.Override
public AccountGoogle parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountGoogle> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountGoogle> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountGoogle getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountGoogleOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountGoogle)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
java.lang.String getToken();
/**
* <pre>
* The OAuth token received from Google to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
com.google.protobuf.ByteString
getTokenBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,196 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.Account)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The user object.
* </pre>
*
* <code>.nakama.api.User user = 1 [json_name = "user"];</code>
* @return Whether the user field is set.
*/
boolean hasUser();
/**
* <pre>
* The user object.
* </pre>
*
* <code>.nakama.api.User user = 1 [json_name = "user"];</code>
* @return The user.
*/
com.heroiclabs.nakama.api.User getUser();
/**
* <pre>
* The user object.
* </pre>
*
* <code>.nakama.api.User user = 1 [json_name = "user"];</code>
*/
com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder();
/**
* <pre>
* The user's wallet data.
* </pre>
*
* <code>string wallet = 2 [json_name = "wallet"];</code>
* @return The wallet.
*/
java.lang.String getWallet();
/**
* <pre>
* The user's wallet data.
* </pre>
*
* <code>string wallet = 2 [json_name = "wallet"];</code>
* @return The bytes for wallet.
*/
com.google.protobuf.ByteString
getWalletBytes();
/**
* <pre>
* The email address of the user.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The email.
*/
java.lang.String getEmail();
/**
* <pre>
* The email address of the user.
* </pre>
*
* <code>string email = 3 [json_name = "email"];</code>
* @return The bytes for email.
*/
com.google.protobuf.ByteString
getEmailBytes();
/**
* <pre>
* The devices which belong to the user's account.
* </pre>
*
* <code>repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"];</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 [json_name = "devices"];</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 [json_name = "devices"];</code>
*/
int getDevicesCount();
/**
* <pre>
* The devices which belong to the user's account.
* </pre>
*
* <code>repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"];</code>
*/
java.util.List<? extends com.heroiclabs.nakama.api.AccountDeviceOrBuilder>
getDevicesOrBuilderList();
/**
* <pre>
* The devices which belong to the user's account.
* </pre>
*
* <code>repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"];</code>
*/
com.heroiclabs.nakama.api.AccountDeviceOrBuilder getDevicesOrBuilder(
int index);
/**
* <pre>
* The custom id in the user's account.
* </pre>
*
* <code>string custom_id = 5 [json_name = "customId"];</code>
* @return The customId.
*/
java.lang.String getCustomId();
/**
* <pre>
* The custom id in the user's account.
* </pre>
*
* <code>string custom_id = 5 [json_name = "customId"];</code>
* @return The bytes for customId.
*/
com.google.protobuf.ByteString
getCustomIdBytes();
/**
* <pre>
* The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
* </pre>
*
* <code>.google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"];</code>
* @return Whether the verifyTime field is set.
*/
boolean hasVerifyTime();
/**
* <pre>
* The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
* </pre>
*
* <code>.google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"];</code>
* @return The verifyTime.
*/
com.google.protobuf.Timestamp getVerifyTime();
/**
* <pre>
* The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
* </pre>
*
* <code>.google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"];</code>
*/
com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder();
/**
* <pre>
* The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
* </pre>
*
* <code>.google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"];</code>
* @return Whether the disableTime field is set.
*/
boolean hasDisableTime();
/**
* <pre>
* The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
* </pre>
*
* <code>.google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"];</code>
* @return The disableTime.
*/
com.google.protobuf.Timestamp getDisableTime();
/**
* <pre>
* The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
* </pre>
*
* <code>.google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"];</code>
*/
com.google.protobuf.TimestampOrBuilder getDisableTimeOrBuilder();
}
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
/**
* <pre>
* Obtain a new authentication token using a refresh token.
* </pre>
*
* Protobuf type {@code nakama.api.AccountRefresh}
*/
public final class AccountRefresh extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountRefresh)
AccountRefreshOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountRefresh.class.getName());
}
// Use AccountRefresh.newBuilder() to construct.
private AccountRefresh(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountRefresh() {
token_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountRefresh.class, com.heroiclabs.nakama.api.AccountRefresh.Builder.class);
}
public static final int TOKEN_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object token_ = "";
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
@java.lang.Override
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
}
}
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, token_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountRefresh)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountRefresh other = (com.heroiclabs.nakama.api.AccountRefresh) obj;
if (!getToken()
.equals(other.getToken())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountRefresh prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Obtain a new authentication token using a refresh token.
* </pre>
*
* Protobuf type {@code nakama.api.AccountRefresh}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountRefresh)
com.heroiclabs.nakama.api.AccountRefreshOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountRefresh.class, com.heroiclabs.nakama.api.AccountRefresh.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountRefresh.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
token_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountRefresh getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountRefresh.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountRefresh build() {
com.heroiclabs.nakama.api.AccountRefresh result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountRefresh buildPartial() {
com.heroiclabs.nakama.api.AccountRefresh result = new com.heroiclabs.nakama.api.AccountRefresh(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountRefresh result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.token_ = token_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountRefresh) {
return mergeFrom((com.heroiclabs.nakama.api.AccountRefresh)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountRefresh other) {
if (other == com.heroiclabs.nakama.api.AccountRefresh.getDefaultInstance()) return this;
if (!other.getToken().isEmpty()) {
token_ = other.token_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
token_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object token_ = "";
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The token to set.
* @return This builder for chaining.
*/
public Builder setToken(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return This builder for chaining.
*/
public Builder clearToken() {
token_ = getDefaultInstance().getToken();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The bytes for token to set.
* @return This builder for chaining.
*/
public Builder setTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountRefresh)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountRefresh)
private static final com.heroiclabs.nakama.api.AccountRefresh DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountRefresh();
}
public static com.heroiclabs.nakama.api.AccountRefresh getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountRefresh>
PARSER = new com.google.protobuf.AbstractParser<AccountRefresh>() {
@java.lang.Override
public AccountRefresh parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountRefresh> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountRefresh> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountRefresh getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountRefreshOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountRefresh)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
java.lang.String getToken();
/**
* <pre>
* Refresh token.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
com.google.protobuf.ByteString
getTokenBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,860 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AccountSteam)
AccountSteamOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AccountSteam.class.getName());
}
// Use AccountSteam.newBuilder() to construct.
private AccountSteam(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AccountSteam() {
token_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountSteam.class, com.heroiclabs.nakama.api.AccountSteam.Builder.class);
}
public static final int TOKEN_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object token_ = "";
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
@java.lang.Override
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
}
}
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VARS_FIELD_NUMBER = 2;
private static final class VarsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.String>newDefaultInstance(
com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_VarsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, token_);
}
com.google.protobuf.GeneratedMessage
.serializeStringMapTo(
output,
internalGetVars(),
VarsDefaultEntryHolder.defaultEntry,
2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_);
}
for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
: internalGetVars().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, vars__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AccountSteam)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AccountSteam other = (com.heroiclabs.nakama.api.AccountSteam) obj;
if (!getToken()
.equals(other.getToken())) return false;
if (!internalGetVars().equals(
other.internalGetVars())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
if (!internalGetVars().getMap().isEmpty()) {
hash = (37 * hash) + VARS_FIELD_NUMBER;
hash = (53 * hash) + internalGetVars().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AccountSteam parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountSteam parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountSteam parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountSteam parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AccountSteam parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountSteam parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountSteam parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AccountSteam parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AccountSteam parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AccountSteam prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <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.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AccountSteam)
com.heroiclabs.nakama.api.AccountSteamOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableVars();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AccountSteam.class, com.heroiclabs.nakama.api.AccountSteam.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AccountSteam.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
token_ = "";
internalGetMutableVars().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountSteam getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountSteam build() {
com.heroiclabs.nakama.api.AccountSteam result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountSteam buildPartial() {
com.heroiclabs.nakama.api.AccountSteam result = new com.heroiclabs.nakama.api.AccountSteam(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AccountSteam result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.token_ = token_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.vars_ = internalGetVars();
result.vars_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AccountSteam) {
return mergeFrom((com.heroiclabs.nakama.api.AccountSteam)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AccountSteam other) {
if (other == com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance()) return this;
if (!other.getToken().isEmpty()) {
token_ = other.token_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableVars().mergeFrom(
other.internalGetVars());
bitField0_ |= 0x00000002;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
token_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
vars__ = input.readMessage(
VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableVars().getMutableMap().put(
vars__.getKey(), vars__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object token_ = "";
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The token to set.
* @return This builder for chaining.
*/
public Builder setToken(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return This builder for chaining.
*/
public Builder clearToken() {
token_ = getDefaultInstance().getToken();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @param value The bytes for token to set.
* @return This builder for chaining.
*/
public Builder setTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
token_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> vars_;
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetVars() {
if (vars_ == null) {
return com.google.protobuf.MapField.emptyMapField(
VarsDefaultEntryHolder.defaultEntry);
}
return vars_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableVars() {
if (vars_ == null) {
vars_ = com.google.protobuf.MapField.newMapField(
VarsDefaultEntryHolder.defaultEntry);
}
if (!vars_.isMutable()) {
vars_ = vars_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return vars_;
}
public int getVarsCount() {
return internalGetVars().getMap().size();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public boolean containsVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetVars().getMap().containsKey(key);
}
/**
* Use {@link #getVarsMap()} instead.
*/
@java.lang.Override
@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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.util.Map<java.lang.String, java.lang.String> getVarsMap() {
return internalGetVars().getMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public /* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
@java.lang.Override
public java.lang.String getVarsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map<java.lang.String, java.lang.String> map =
internalGetVars().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearVars() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableVars().getMutableMap()
.clear();
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder removeVars(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableVars().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.String>
getMutableVars() {
bitField0_ |= 0x00000002;
return internalGetMutableVars().getMutableMap();
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putVars(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableVars().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
public Builder putAllVars(
java.util.Map<java.lang.String, java.lang.String> values) {
internalGetMutableVars().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AccountSteam)
}
// @@protoc_insertion_point(class_scope:nakama.api.AccountSteam)
private static final com.heroiclabs.nakama.api.AccountSteam DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountSteam();
}
public static com.heroiclabs.nakama.api.AccountSteam getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AccountSteam>
PARSER = new com.google.protobuf.AbstractParser<AccountSteam>() {
@java.lang.Override
public AccountSteam parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AccountSteam> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AccountSteam> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AccountSteam getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AccountSteamOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AccountSteam)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The token.
*/
java.lang.String getToken();
/**
* <pre>
* The account token received from Steam to access their profile API.
* </pre>
*
* <code>string token = 1 [json_name = "token"];</code>
* @return The bytes for token.
*/
com.google.protobuf.ByteString
getTokenBytes();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
int getVarsCount();
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</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&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
/* nullable */
java.lang.String getVarsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
* <pre>
* Extra information that will be bundled in the session token.
* </pre>
*
* <code>map&lt;string, string&gt; vars = 2 [json_name = "vars"];</code>
*/
java.lang.String getVarsOrThrow(
java.lang.String key);
}
@@ -0,0 +1,855 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AddFriendsRequest)
AddFriendsRequestOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AddFriendsRequest.class.getName());
}
// Use AddFriendsRequest.newBuilder() to construct.
private AddFriendsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AddFriendsRequest() {
ids_ =
com.google.protobuf.LazyStringArrayList.emptyList();
usernames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AddFriendsRequest.class, com.heroiclabs.nakama.api.AddFriendsRequest.Builder.class);
}
public static final int IDS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList ids_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @return A list containing the ids.
*/
public com.google.protobuf.ProtocolStringList
getIdsList() {
return ids_;
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @return The count of ids.
*/
public int getIdsCount() {
return ids_.size();
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param index The index of the element to return.
* @return The ids at the given index.
*/
public java.lang.String getIds(int index) {
return ids_.get(index);
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param index The index of the value to return.
* @return The bytes of the ids at the given index.
*/
public com.google.protobuf.ByteString
getIdsBytes(int index) {
return ids_.getByteString(index);
}
public static final int USERNAMES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList usernames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @return A list containing the usernames.
*/
public com.google.protobuf.ProtocolStringList
getUsernamesList() {
return usernames_;
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @return The count of usernames.
*/
public int getUsernamesCount() {
return usernames_.size();
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param index The index of the element to return.
* @return The usernames at the given index.
*/
public java.lang.String getUsernames(int index) {
return usernames_.get(index);
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param index The index of the value to return.
* @return The bytes of the usernames at the given index.
*/
public com.google.protobuf.ByteString
getUsernamesBytes(int index) {
return usernames_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < ids_.size(); i++) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i));
}
for (int i = 0; i < usernames_.size(); i++) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, usernames_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < ids_.size(); i++) {
dataSize += computeStringSizeNoTag(ids_.getRaw(i));
}
size += dataSize;
size += 1 * getIdsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < usernames_.size(); i++) {
dataSize += computeStringSizeNoTag(usernames_.getRaw(i));
}
size += dataSize;
size += 1 * getUsernamesList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AddFriendsRequest)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AddFriendsRequest other = (com.heroiclabs.nakama.api.AddFriendsRequest) obj;
if (!getIdsList()
.equals(other.getIdsList())) return false;
if (!getUsernamesList()
.equals(other.getUsernamesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getIdsCount() > 0) {
hash = (37 * hash) + IDS_FIELD_NUMBER;
hash = (53 * hash) + getIdsList().hashCode();
}
if (getUsernamesCount() > 0) {
hash = (37 * hash) + USERNAMES_FIELD_NUMBER;
hash = (53 * hash) + getUsernamesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AddFriendsRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <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.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AddFriendsRequest)
com.heroiclabs.nakama.api.AddFriendsRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AddFriendsRequest.class, com.heroiclabs.nakama.api.AddFriendsRequest.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AddFriendsRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
ids_ =
com.google.protobuf.LazyStringArrayList.emptyList();
usernames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddFriendsRequest getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AddFriendsRequest.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddFriendsRequest build() {
com.heroiclabs.nakama.api.AddFriendsRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddFriendsRequest buildPartial() {
com.heroiclabs.nakama.api.AddFriendsRequest result = new com.heroiclabs.nakama.api.AddFriendsRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AddFriendsRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
ids_.makeImmutable();
result.ids_ = ids_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
usernames_.makeImmutable();
result.usernames_ = usernames_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AddFriendsRequest) {
return mergeFrom((com.heroiclabs.nakama.api.AddFriendsRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AddFriendsRequest other) {
if (other == com.heroiclabs.nakama.api.AddFriendsRequest.getDefaultInstance()) return this;
if (!other.ids_.isEmpty()) {
if (ids_.isEmpty()) {
ids_ = other.ids_;
bitField0_ |= 0x00000001;
} else {
ensureIdsIsMutable();
ids_.addAll(other.ids_);
}
onChanged();
}
if (!other.usernames_.isEmpty()) {
if (usernames_.isEmpty()) {
usernames_ = other.usernames_;
bitField0_ |= 0x00000002;
} else {
ensureUsernamesIsMutable();
usernames_.addAll(other.usernames_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
ensureIdsIsMutable();
ids_.add(s);
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensureUsernamesIsMutable();
usernames_.add(s);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringArrayList ids_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureIdsIsMutable() {
if (!ids_.isModifiable()) {
ids_ = new com.google.protobuf.LazyStringArrayList(ids_);
}
bitField0_ |= 0x00000001;
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @return A list containing the ids.
*/
public com.google.protobuf.ProtocolStringList
getIdsList() {
ids_.makeImmutable();
return ids_;
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @return The count of ids.
*/
public int getIdsCount() {
return ids_.size();
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param index The index of the element to return.
* @return The ids at the given index.
*/
public java.lang.String getIds(int index) {
return ids_.get(index);
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param index The index of the value to return.
* @return The bytes of the ids at the given index.
*/
public com.google.protobuf.ByteString
getIdsBytes(int index) {
return ids_.getByteString(index);
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param index The index to set the value at.
* @param value The ids to set.
* @return This builder for chaining.
*/
public Builder setIds(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureIdsIsMutable();
ids_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param value The ids to add.
* @return This builder for chaining.
*/
public Builder addIds(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureIdsIsMutable();
ids_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param values The ids to add.
* @return This builder for chaining.
*/
public Builder addAllIds(
java.lang.Iterable<java.lang.String> values) {
ensureIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, ids_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @return This builder for chaining.
*/
public Builder clearIds() {
ids_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param value The bytes of the ids to add.
* @return This builder for chaining.
*/
public Builder addIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureIdsIsMutable();
ids_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList usernames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureUsernamesIsMutable() {
if (!usernames_.isModifiable()) {
usernames_ = new com.google.protobuf.LazyStringArrayList(usernames_);
}
bitField0_ |= 0x00000002;
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @return A list containing the usernames.
*/
public com.google.protobuf.ProtocolStringList
getUsernamesList() {
usernames_.makeImmutable();
return usernames_;
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @return The count of usernames.
*/
public int getUsernamesCount() {
return usernames_.size();
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param index The index of the element to return.
* @return The usernames at the given index.
*/
public java.lang.String getUsernames(int index) {
return usernames_.get(index);
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param index The index of the value to return.
* @return The bytes of the usernames at the given index.
*/
public com.google.protobuf.ByteString
getUsernamesBytes(int index) {
return usernames_.getByteString(index);
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param index The index to set the value at.
* @param value The usernames to set.
* @return This builder for chaining.
*/
public Builder setUsernames(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureUsernamesIsMutable();
usernames_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param value The usernames to add.
* @return This builder for chaining.
*/
public Builder addUsernames(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureUsernamesIsMutable();
usernames_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param values The usernames to add.
* @return This builder for chaining.
*/
public Builder addAllUsernames(
java.lang.Iterable<java.lang.String> values) {
ensureUsernamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, usernames_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @return This builder for chaining.
*/
public Builder clearUsernames() {
usernames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param value The bytes of the usernames to add.
* @return This builder for chaining.
*/
public Builder addUsernamesBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureUsernamesIsMutable();
usernames_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AddFriendsRequest)
}
// @@protoc_insertion_point(class_scope:nakama.api.AddFriendsRequest)
private static final com.heroiclabs.nakama.api.AddFriendsRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AddFriendsRequest();
}
public static com.heroiclabs.nakama.api.AddFriendsRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AddFriendsRequest>
PARSER = new com.google.protobuf.AbstractParser<AddFriendsRequest>() {
@java.lang.Override
public AddFriendsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AddFriendsRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AddFriendsRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddFriendsRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,93 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AddFriendsRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AddFriendsRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @return A list containing the ids.
*/
java.util.List<java.lang.String>
getIdsList();
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @return The count of ids.
*/
int getIdsCount();
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param index The index of the element to return.
* @return The ids at the given index.
*/
java.lang.String getIds(int index);
/**
* <pre>
* The account id of a user.
* </pre>
*
* <code>repeated string ids = 1 [json_name = "ids"];</code>
* @param index The index of the value to return.
* @return The bytes of the ids at the given index.
*/
com.google.protobuf.ByteString
getIdsBytes(int index);
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @return A list containing the usernames.
*/
java.util.List<java.lang.String>
getUsernamesList();
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @return The count of usernames.
*/
int getUsernamesCount();
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param index The index of the element to return.
* @return The usernames at the given index.
*/
java.lang.String getUsernames(int index);
/**
* <pre>
* The account username of a user.
* </pre>
*
* <code>repeated string usernames = 2 [json_name = "usernames"];</code>
* @param index The index of the value to return.
* @return The bytes of the usernames at the given index.
*/
com.google.protobuf.ByteString
getUsernamesBytes(int index);
}
@@ -0,0 +1,778 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
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.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.AddGroupUsersRequest)
AddGroupUsersRequestOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
AddGroupUsersRequest.class.getName());
}
// Use AddGroupUsersRequest.newBuilder() to construct.
private AddGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private AddGroupUsersRequest() {
groupId_ = "";
userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AddGroupUsersRequest.class, com.heroiclabs.nakama.api.AddGroupUsersRequest.Builder.class);
}
public static final int GROUP_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object groupId_ = "";
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The groupId.
*/
@java.lang.Override
public java.lang.String getGroupId() {
java.lang.Object ref = groupId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
groupId_ = s;
return s;
}
}
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The bytes for groupId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getGroupIdBytes() {
java.lang.Object ref = groupId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
groupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_IDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return A list containing the userIds.
*/
public com.google.protobuf.ProtocolStringList
getUserIdsList() {
return userIds_;
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return The count of userIds.
*/
public int getUserIdsCount() {
return userIds_.size();
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_);
}
for (int i = 0; i < userIds_.size(); i++) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, userIds_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_);
}
{
int dataSize = 0;
for (int i = 0; i < userIds_.size(); i++) {
dataSize += computeStringSizeNoTag(userIds_.getRaw(i));
}
size += dataSize;
size += 1 * getUserIdsList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.AddGroupUsersRequest)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.AddGroupUsersRequest other = (com.heroiclabs.nakama.api.AddGroupUsersRequest) obj;
if (!getGroupId()
.equals(other.getGroupId())) return false;
if (!getUserIdsList()
.equals(other.getUserIdsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
hash = (53 * hash) + getGroupId().hashCode();
if (getUserIdsCount() > 0) {
hash = (37 * hash) + USER_IDS_FIELD_NUMBER;
hash = (53 * hash) + getUserIdsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, 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.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.AddGroupUsersRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Add users to a group.
* </pre>
*
* Protobuf type {@code nakama.api.AddGroupUsersRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.AddGroupUsersRequest)
com.heroiclabs.nakama.api.AddGroupUsersRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.AddGroupUsersRequest.class, com.heroiclabs.nakama.api.AddGroupUsersRequest.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.AddGroupUsersRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
groupId_ = "";
userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddGroupUsersRequest getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.AddGroupUsersRequest.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddGroupUsersRequest build() {
com.heroiclabs.nakama.api.AddGroupUsersRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddGroupUsersRequest buildPartial() {
com.heroiclabs.nakama.api.AddGroupUsersRequest result = new com.heroiclabs.nakama.api.AddGroupUsersRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.AddGroupUsersRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.groupId_ = groupId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
userIds_.makeImmutable();
result.userIds_ = userIds_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.AddGroupUsersRequest) {
return mergeFrom((com.heroiclabs.nakama.api.AddGroupUsersRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.AddGroupUsersRequest other) {
if (other == com.heroiclabs.nakama.api.AddGroupUsersRequest.getDefaultInstance()) return this;
if (!other.getGroupId().isEmpty()) {
groupId_ = other.groupId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.userIds_.isEmpty()) {
if (userIds_.isEmpty()) {
userIds_ = other.userIds_;
bitField0_ |= 0x00000002;
} else {
ensureUserIdsIsMutable();
userIds_.addAll(other.userIds_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
groupId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensureUserIdsIsMutable();
userIds_.add(s);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object groupId_ = "";
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The groupId.
*/
public java.lang.String getGroupId() {
java.lang.Object ref = groupId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
groupId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The bytes for groupId.
*/
public com.google.protobuf.ByteString
getGroupIdBytes() {
java.lang.Object ref = groupId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
groupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @param value The groupId to set.
* @return This builder for chaining.
*/
public Builder setGroupId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
groupId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return This builder for chaining.
*/
public Builder clearGroupId() {
groupId_ = getDefaultInstance().getGroupId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @param value The bytes for groupId to set.
* @return This builder for chaining.
*/
public Builder setGroupIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
groupId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureUserIdsIsMutable() {
if (!userIds_.isModifiable()) {
userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_);
}
bitField0_ |= 0x00000002;
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return A list containing the userIds.
*/
public com.google.protobuf.ProtocolStringList
getUserIdsList() {
userIds_.makeImmutable();
return userIds_;
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return The count of userIds.
*/
public int getUserIdsCount() {
return userIds_.size();
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index to set the value at.
* @param value The userIds to set.
* @return This builder for chaining.
*/
public Builder setUserIds(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureUserIdsIsMutable();
userIds_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param value The userIds to add.
* @return This builder for chaining.
*/
public Builder addUserIds(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureUserIdsIsMutable();
userIds_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param values The userIds to add.
* @return This builder for chaining.
*/
public Builder addAllUserIds(
java.lang.Iterable<java.lang.String> values) {
ensureUserIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, userIds_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return This builder for chaining.
*/
public Builder clearUserIds() {
userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param value The bytes of the userIds to add.
* @return This builder for chaining.
*/
public Builder addUserIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureUserIdsIsMutable();
userIds_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.AddGroupUsersRequest)
}
// @@protoc_insertion_point(class_scope:nakama.api.AddGroupUsersRequest)
private static final com.heroiclabs.nakama.api.AddGroupUsersRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AddGroupUsersRequest();
}
public static com.heroiclabs.nakama.api.AddGroupUsersRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AddGroupUsersRequest>
PARSER = new com.google.protobuf.AbstractParser<AddGroupUsersRequest>() {
@java.lang.Override
public AddGroupUsersRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<AddGroupUsersRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AddGroupUsersRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.AddGroupUsersRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@@ -0,0 +1,72 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AddGroupUsersRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AddGroupUsersRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The groupId.
*/
java.lang.String getGroupId();
/**
* <pre>
* The group to add users to.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The bytes for groupId.
*/
com.google.protobuf.ByteString
getGroupIdBytes();
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return A list containing the userIds.
*/
java.util.List<java.lang.String>
getUserIdsList();
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return The count of userIds.
*/
int getUserIdsCount();
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
java.lang.String getUserIds(int index);
/**
* <pre>
* The users to add.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
com.google.protobuf.ByteString
getUserIdsBytes(int index);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,333 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama/api/apigrpc.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public final class ApigrpcProto {
private ApigrpcProto() {}
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
ApigrpcProto.class.getName());
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n.github.com/heroiclabs/nakama/api/apigr" +
"pc.proto\022\nnakama.api\032\034google/api/annotat" +
"ions.proto\032\033google/protobuf/empty.proto\032" +
".protoc-gen-openapiv2/options/annotation" +
"s.proto\0321github.com/heroiclabs/nakama-co" +
"mmon/api/api.proto2\237O\n\006Nakama\022W\n\nAddFrie" +
"nds\022\035.nakama.api.AddFriendsRequest\032\026.goo" +
"gle.protobuf.Empty\"\022\202\323\344\223\002\014\"\n/v2/friend\022k" +
"\n\rAddGroupUsers\022 .nakama.api.AddGroupUse" +
"rsRequest\032\026.google.protobuf.Empty\" \202\323\344\223\002" +
"\032\"\030/v2/group/{group_id}/add\022\204\001\n\016SessionR" +
"efresh\022!.nakama.api.SessionRefreshReques" +
"t\032\023.nakama.api.Session\":\222A\021b\017\n\r\n\tBasicAu" +
"th\022\000\202\323\344\223\002 \"\033/v2/account/session/refresh:" +
"\001*\022h\n\rSessionLogout\022 .nakama.api.Session" +
"LogoutRequest\032\026.google.protobuf.Empty\"\035\202" +
"\323\344\223\002\027\"\022/v2/session/logout:\001*\022\223\001\n\021Authent" +
"icateApple\022$.nakama.api.AuthenticateAppl" +
"eRequest\032\023.nakama.api.Session\"C\222A\021b\017\n\r\n\t" +
"BasicAuth\022\000\202\323\344\223\002)\"\036/v2/account/authentic" +
"ate/apple:\007account\022\226\001\n\022AuthenticateCusto" +
"m\022%.nakama.api.AuthenticateCustomRequest" +
"\032\023.nakama.api.Session\"D\222A\021b\017\n\r\n\tBasicAut" +
"h\022\000\202\323\344\223\002*\"\037/v2/account/authenticate/cust" +
"om:\007account\022\226\001\n\022AuthenticateDevice\022%.nak" +
"ama.api.AuthenticateDeviceRequest\032\023.naka" +
"ma.api.Session\"D\222A\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223" +
"\002*\"\037/v2/account/authenticate/device:\007acc" +
"ount\022\223\001\n\021AuthenticateEmail\022$.nakama.api." +
"AuthenticateEmailRequest\032\023.nakama.api.Se" +
"ssion\"C\222A\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223\002)\"\036/v2/a" +
"ccount/authenticate/email:\007account\022\234\001\n\024A" +
"uthenticateFacebook\022\'.nakama.api.Authent" +
"icateFacebookRequest\032\023.nakama.api.Sessio" +
"n\"F\222A\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223\002,\"!/v2/accou" +
"nt/authenticate/facebook:\007account\022\275\001\n\037Au" +
"thenticateFacebookInstantGame\0222.nakama.a" +
"pi.AuthenticateFacebookInstantGameReques" +
"t\032\023.nakama.api.Session\"Q\222A\021b\017\n\r\n\tBasicAu" +
"th\022\000\202\323\344\223\0027\",/v2/account/authenticate/fac" +
"ebookinstantgame:\007account\022\242\001\n\026Authentica" +
"teGameCenter\022).nakama.api.AuthenticateGa" +
"meCenterRequest\032\023.nakama.api.Session\"H\222A" +
"\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223\002.\"#/v2/account/au" +
"thenticate/gamecenter:\007account\022\226\001\n\022Authe" +
"nticateGoogle\022%.nakama.api.AuthenticateG" +
"oogleRequest\032\023.nakama.api.Session\"D\222A\021b\017" +
"\n\r\n\tBasicAuth\022\000\202\323\344\223\002*\"\037/v2/account/authe" +
"nticate/google:\007account\022\223\001\n\021Authenticate" +
"Steam\022$.nakama.api.AuthenticateSteamRequ" +
"est\032\023.nakama.api.Session\"C\222A\021b\017\n\r\n\tBasic" +
"Auth\022\000\202\323\344\223\002)\"\036/v2/account/authenticate/s" +
"team:\007account\022k\n\rBanGroupUsers\022 .nakama." +
"api.BanGroupUsersRequest\032\026.google.protob" +
"uf.Empty\" \202\323\344\223\002\032\"\030/v2/group/{group_id}/b" +
"an\022a\n\014BlockFriends\022\037.nakama.api.BlockFri" +
"endsRequest\032\026.google.protobuf.Empty\"\030\202\323\344" +
"\223\002\022\"\020/v2/friend/block\022V\n\013CreateGroup\022\036.n" +
"akama.api.CreateGroupRequest\032\021.nakama.ap" +
"i.Group\"\024\202\323\344\223\002\016\"\t/v2/group:\001*\022T\n\rDeleteA" +
"ccount\022\026.google.protobuf.Empty\032\026.google." +
"protobuf.Empty\"\023\202\323\344\223\002\r*\013/v2/account\022]\n\rD" +
"eleteFriends\022 .nakama.api.DeleteFriendsR" +
"equest\032\026.google.protobuf.Empty\"\022\202\323\344\223\002\014*\n" +
"/v2/friend\022c\n\013DeleteGroup\022\036.nakama.api.D" +
"eleteGroupRequest\032\026.google.protobuf.Empt" +
"y\"\034\202\323\344\223\002\026*\024/v2/group/{group_id}\022\207\001\n\027Dele" +
"teLeaderboardRecord\022*.nakama.api.DeleteL" +
"eaderboardRecordRequest\032\026.google.protobu" +
"f.Empty\"(\202\323\344\223\002\"* /v2/leaderboard/{leader" +
"board_id}\022o\n\023DeleteNotifications\022&.nakam" +
"a.api.DeleteNotificationsRequest\032\026.googl" +
"e.protobuf.Empty\"\030\202\323\344\223\002\022*\020/v2/notificati" +
"on\022\203\001\n\026DeleteTournamentRecord\022).nakama.a" +
"pi.DeleteTournamentRecordRequest\032\026.googl" +
"e.protobuf.Empty\"&\202\323\344\223\002 *\036/v2/tournament" +
"/{tournament_id}\022v\n\024DeleteStorageObjects" +
"\022\'.nakama.api.DeleteStorageObjectsReques" +
"t\032\026.google.protobuf.Empty\"\035\202\323\344\223\002\027\032\022/v2/s" +
"torage/delete:\001*\022H\n\005Event\022\021.nakama.api.E" +
"vent\032\026.google.protobuf.Empty\"\024\202\323\344\223\002\016\"\t/v" +
"2/event:\001*\022N\n\nGetAccount\022\026.google.protob" +
"uf.Empty\032\023.nakama.api.Account\"\023\202\323\344\223\002\r\022\013/" +
"v2/account\022L\n\010GetUsers\022\033.nakama.api.GetU" +
"sersRequest\032\021.nakama.api.Users\"\020\202\323\344\223\002\n\022\010" +
"/v2/user\022\203\001\n\017GetSubscription\022\".nakama.ap" +
"i.GetSubscriptionRequest\032!.nakama.api.Va" +
"lidatedSubscription\")\202\323\344\223\002#\022!/v2/iap/sub" +
"scription/{product_id}\022g\n\022GetMatchmakerS" +
"tats\022\026.google.protobuf.Empty\032\033.nakama.ap" +
"i.MatchmakerStats\"\034\202\323\344\223\002\026\022\024/v2/matchmake" +
"r/stats\022S\n\013Healthcheck\022\026.google.protobuf" +
".Empty\032\026.google.protobuf.Empty\"\024\202\323\344\223\002\016\022\014" +
"/healthcheck\022\177\n\025ImportFacebookFriends\022(." +
"nakama.api.ImportFacebookFriendsRequest\032" +
"\026.google.protobuf.Empty\"$\202\323\344\223\002\036\"\023/v2/fri" +
"end/facebook:\007account\022v\n\022ImportSteamFrie" +
"nds\022%.nakama.api.ImportSteamFriendsReque" +
"st\032\026.google.protobuf.Empty\"!\202\323\344\223\002\033\"\020/v2/" +
"friend/steam:\007account\022d\n\tJoinGroup\022\034.nak" +
"ama.api.JoinGroupRequest\032\026.google.protob" +
"uf.Empty\"!\202\323\344\223\002\033\"\031/v2/group/{group_id}/j" +
"oin\022x\n\016JoinTournament\022!.nakama.api.JoinT" +
"ournamentRequest\032\026.google.protobuf.Empty" +
"\"+\202\323\344\223\002%\"#/v2/tournament/{tournament_id}" +
"/join\022n\n\016KickGroupUsers\022!.nakama.api.Kic" +
"kGroupUsersRequest\032\026.google.protobuf.Emp" +
"ty\"!\202\323\344\223\002\033\"\031/v2/group/{group_id}/kick\022g\n" +
"\nLeaveGroup\022\035.nakama.api.LeaveGroupReque" +
"st\032\026.google.protobuf.Empty\"\"\202\323\344\223\002\034\"\032/v2/" +
"group/{group_id}/leave\022`\n\tLinkApple\022\030.na" +
"kama.api.AccountApple\032\026.google.protobuf." +
"Empty\"!\202\323\344\223\002\033\"\026/v2/account/link/apple:\001*" +
"\022c\n\nLinkCustom\022\031.nakama.api.AccountCusto" +
"m\032\026.google.protobuf.Empty\"\"\202\323\344\223\002\034\"\027/v2/a" +
"ccount/link/custom:\001*\022c\n\nLinkDevice\022\031.na" +
"kama.api.AccountDevice\032\026.google.protobuf" +
".Empty\"\"\202\323\344\223\002\034\"\027/v2/account/link/device:" +
"\001*\022`\n\tLinkEmail\022\030.nakama.api.AccountEmai" +
"l\032\026.google.protobuf.Empty\"!\202\323\344\223\002\033\"\026/v2/a" +
"ccount/link/email:\001*\022s\n\014LinkFacebook\022\037.n" +
"akama.api.LinkFacebookRequest\032\026.google.p" +
"rotobuf.Empty\"*\202\323\344\223\002$\"\031/v2/account/link/" +
"facebook:\007account\022\212\001\n\027LinkFacebookInstan" +
"tGame\022&.nakama.api.AccountFacebookInstan" +
"tGame\032\026.google.protobuf.Empty\"/\202\323\344\223\002)\"$/" +
"v2/account/link/facebookinstantgame:\001*\022o" +
"\n\016LinkGameCenter\022\035.nakama.api.AccountGam" +
"eCenter\032\026.google.protobuf.Empty\"&\202\323\344\223\002 \"" +
"\033/v2/account/link/gamecenter:\001*\022c\n\nLinkG" +
"oogle\022\031.nakama.api.AccountGoogle\032\026.googl" +
"e.protobuf.Empty\"\"\202\323\344\223\002\034\"\027/v2/account/li" +
"nk/google:\001*\022d\n\tLinkSteam\022\034.nakama.api.L" +
"inkSteamRequest\032\026.google.protobuf.Empty\"" +
"!\202\323\344\223\002\033\"\026/v2/account/link/steam:\001*\022\177\n\023Li" +
"stChannelMessages\022&.nakama.api.ListChann" +
"elMessagesRequest\032\036.nakama.api.ChannelMe" +
"ssageList\" \202\323\344\223\002\032\022\030/v2/channel/{channel_" +
"id}\022Y\n\013ListFriends\022\036.nakama.api.ListFrie" +
"ndsRequest\032\026.nakama.api.FriendList\"\022\202\323\344\223" +
"\002\014\022\n/v2/friend\022}\n\024ListFriendsOfFriends\022\'" +
".nakama.api.ListFriendsOfFriendsRequest\032" +
" .nakama.api.FriendsOfFriendsList\"\032\202\323\344\223\002" +
"\024\022\022/v2/friend/friends\022U\n\nListGroups\022\035.na" +
"kama.api.ListGroupsRequest\032\025.nakama.api." +
"GroupList\"\021\202\323\344\223\002\013\022\t/v2/group\022q\n\016ListGrou" +
"pUsers\022!.nakama.api.ListGroupUsersReques" +
"t\032\031.nakama.api.GroupUserList\"!\202\323\344\223\002\033\022\031/v" +
"2/group/{group_id}/user\022\220\001\n\026ListLeaderbo" +
"ardRecords\022).nakama.api.ListLeaderboardR" +
"ecordsRequest\032!.nakama.api.LeaderboardRe" +
"cordList\"(\202\323\344\223\002\"\022 /v2/leaderboard/{leade" +
"rboard_id}\022\267\001\n!ListLeaderboardRecordsAro" +
"undOwner\0224.nakama.api.ListLeaderboardRec" +
"ordsAroundOwnerRequest\032!.nakama.api.Lead" +
"erboardRecordList\"9\202\323\344\223\0023\0221/v2/leaderboa" +
"rd/{leaderboard_id}/owner/{owner_id}\022W\n\013" +
"ListMatches\022\036.nakama.api.ListMatchesRequ" +
"est\032\025.nakama.api.MatchList\"\021\202\323\344\223\002\013\022\t/v2/" +
"match\022q\n\021ListNotifications\022$.nakama.api." +
"ListNotificationsRequest\032\034.nakama.api.No" +
"tificationList\"\030\202\323\344\223\002\022\022\020/v2/notification" +
"\022\242\001\n\022ListStorageObjects\022%.nakama.api.Lis" +
"tStorageObjectsRequest\032\035.nakama.api.Stor" +
"ageObjectList\"F\202\323\344\223\002@\022\030/v2/storage/{coll" +
"ection}Z$\022\"/v2/storage/{collection}/{use" +
"r_id}\022x\n\021ListSubscriptions\022$.nakama.api." +
"ListSubscriptionsRequest\032\034.nakama.api.Su" +
"bscriptionList\"\037\202\323\344\223\002\031\"\024/v2/iap/subscrip" +
"tion:\001*\022i\n\017ListTournaments\022\".nakama.api." +
"ListTournamentsRequest\032\032.nakama.api.Tour" +
"namentList\"\026\202\323\344\223\002\020\022\016/v2/tournament\022\213\001\n\025L" +
"istTournamentRecords\022(.nakama.api.ListTo" +
"urnamentRecordsRequest\032 .nakama.api.Tour" +
"namentRecordList\"&\202\323\344\223\002 \022\036/v2/tournament" +
"/{tournament_id}\022\262\001\n ListTournamentRecor" +
"dsAroundOwner\0223.nakama.api.ListTournamen" +
"tRecordsAroundOwnerRequest\032 .nakama.api." +
"TournamentRecordList\"7\202\323\344\223\0021\022//v2/tourna" +
"ment/{tournament_id}/owner/{owner_id}\022p\n" +
"\016ListUserGroups\022!.nakama.api.ListUserGro" +
"upsRequest\032\031.nakama.api.UserGroupList\" \202" +
"\323\344\223\002\032\022\030/v2/user/{user_id}/group\022w\n\021Promo" +
"teGroupUsers\022$.nakama.api.PromoteGroupUs" +
"ersRequest\032\026.google.protobuf.Empty\"$\202\323\344\223" +
"\002\036\"\034/v2/group/{group_id}/promote\022t\n\020Demo" +
"teGroupUsers\022#.nakama.api.DemoteGroupUse" +
"rsRequest\032\026.google.protobuf.Empty\"#\202\323\344\223\002" +
"\035\"\033/v2/group/{group_id}/demote\022o\n\022ReadSt" +
"orageObjects\022%.nakama.api.ReadStorageObj" +
"ectsRequest\032\032.nakama.api.StorageObjects\"" +
"\026\202\323\344\223\002\020\"\013/v2/storage:\001*\022\177\n\007RpcFunc\022\017.nak" +
"ama.api.Rpc\032\017.nakama.api.Rpc\"R\222A\"b \n\r\n\tB" +
"earerJwt\022\000\n\017\n\013HttpKeyAuth\022\000\202\323\344\223\002\'\"\014/v2/r" +
"pc/{id}:\007payloadZ\016\022\014/v2/rpc/{id}\022d\n\013Unli" +
"nkApple\022\030.nakama.api.AccountApple\032\026.goog" +
"le.protobuf.Empty\"#\202\323\344\223\002\035\"\030/v2/account/u" +
"nlink/apple:\001*\022g\n\014UnlinkCustom\022\031.nakama." +
"api.AccountCustom\032\026.google.protobuf.Empt" +
"y\"$\202\323\344\223\002\036\"\031/v2/account/unlink/custom:\001*\022" +
"g\n\014UnlinkDevice\022\031.nakama.api.AccountDevi" +
"ce\032\026.google.protobuf.Empty\"$\202\323\344\223\002\036\"\031/v2/" +
"account/unlink/device:\001*\022d\n\013UnlinkEmail\022" +
"\030.nakama.api.AccountEmail\032\026.google.proto" +
"buf.Empty\"#\202\323\344\223\002\035\"\030/v2/account/unlink/em" +
"ail:\001*\022m\n\016UnlinkFacebook\022\033.nakama.api.Ac" +
"countFacebook\032\026.google.protobuf.Empty\"&\202" +
"\323\344\223\002 \"\033/v2/account/unlink/facebook:\001*\022\216\001" +
"\n\031UnlinkFacebookInstantGame\022&.nakama.api" +
".AccountFacebookInstantGame\032\026.google.pro" +
"tobuf.Empty\"1\202\323\344\223\002+\"&/v2/account/unlink/" +
"facebookinstantgame:\001*\022s\n\020UnlinkGameCent" +
"er\022\035.nakama.api.AccountGameCenter\032\026.goog" +
"le.protobuf.Empty\"(\202\323\344\223\002\"\"\035/v2/account/u" +
"nlink/gamecenter:\001*\022g\n\014UnlinkGoogle\022\031.na" +
"kama.api.AccountGoogle\032\026.google.protobuf" +
".Empty\"$\202\323\344\223\002\036\"\031/v2/account/unlink/googl" +
"e:\001*\022d\n\013UnlinkSteam\022\030.nakama.api.Account" +
"Steam\032\026.google.protobuf.Empty\"#\202\323\344\223\002\035\"\030/" +
"v2/account/unlink/steam:\001*\022a\n\rUpdateAcco" +
"unt\022 .nakama.api.UpdateAccountRequest\032\026." +
"google.protobuf.Empty\"\026\202\323\344\223\002\020\032\013/v2/accou" +
"nt:\001*\022f\n\013UpdateGroup\022\036.nakama.api.Update" +
"GroupRequest\032\026.google.protobuf.Empty\"\037\202\323" +
"\344\223\002\031\032\024/v2/group/{group_id}:\001*\022\212\001\n\025Valida" +
"tePurchaseApple\022(.nakama.api.ValidatePur" +
"chaseAppleRequest\032$.nakama.api.ValidateP" +
"urchaseResponse\"!\202\323\344\223\002\033\"\026/v2/iap/purchas" +
"e/apple:\001*\022\232\001\n\031ValidateSubscriptionApple" +
"\022,.nakama.api.ValidateSubscriptionAppleR" +
"equest\032(.nakama.api.ValidateSubscription" +
"Response\"%\202\323\344\223\002\037\"\032/v2/iap/subscription/a" +
"pple:\001*\022\215\001\n\026ValidatePurchaseGoogle\022).nak" +
"ama.api.ValidatePurchaseGoogleRequest\032$." +
"nakama.api.ValidatePurchaseResponse\"\"\202\323\344" +
"\223\002\034\"\027/v2/iap/purchase/google:\001*\022\235\001\n\032Vali" +
"dateSubscriptionGoogle\022-.nakama.api.Vali" +
"dateSubscriptionGoogleRequest\032(.nakama.a" +
"pi.ValidateSubscriptionResponse\"&\202\323\344\223\002 \"" +
"\033/v2/iap/subscription/google:\001*\022\215\001\n\026Vali" +
"datePurchaseHuawei\022).nakama.api.Validate" +
"PurchaseHuaweiRequest\032$.nakama.api.Valid" +
"atePurchaseResponse\"\"\202\323\344\223\002\034\"\027/v2/iap/pur" +
"chase/huawei:\001*\022\250\001\n\037ValidatePurchaseFace" +
"bookInstant\0222.nakama.api.ValidatePurchas" +
"eFacebookInstantRequest\032$.nakama.api.Val" +
"idatePurchaseResponse\"+\202\323\344\223\002%\" /v2/iap/p" +
"urchase/facebookinstant:\001*\022\224\001\n\026WriteLead" +
"erboardRecord\022).nakama.api.WriteLeaderbo" +
"ardRecordRequest\032\035.nakama.api.Leaderboar" +
"dRecord\"0\202\323\344\223\002*\" /v2/leaderboard/{leader" +
"board_id}:\006record\022t\n\023WriteStorageObjects" +
"\022&.nakama.api.WriteStorageObjectsRequest" +
"\032\035.nakama.api.StorageObjectAcks\"\026\202\323\344\223\002\020\032" +
"\013/v2/storage:\001*\022\272\001\n\025WriteTournamentRecor" +
"d\022(.nakama.api.WriteTournamentRecordRequ" +
"est\032\035.nakama.api.LeaderboardRecord\"X\202\323\344\223" +
"\002R\032\036/v2/tournament/{tournament_id}:\006reco" +
"rdZ(\"\036/v2/tournament/{tournament_id}:\006re" +
"cordB\356\003\n\031com.heroiclabs.nakama.apiB\014Apig" +
"rpcProtoP\001Z\'github.com/heroiclabs/nakama" +
"/v3/apigrpc\242\002\003NAX\252\002\nNakama.Api\312\002\nNakama\\" +
"Api\342\002\026Nakama\\Api\\GPBMetadata\352\002\013Nakama::A" +
"pi\222A\317\002\022u\n\rNakama API v2\"_\n!The Nakama Au" +
"thors & Contributors\022$https://github.com" +
"/heroiclabs/nakama\032\[email protected]" +
"2\0032.0\032\016127.0.0.1:7350*\001\0012\020application/js" +
"on:\020application/jsonZR\n\017\n\tBasicAuth\022\002\010\001\n" +
" \n\tBearerJwt\022\023\010\002\032\rAuthorization \002\n\035\n\013Htt" +
"pKeyAuth\022\016\010\002\032\010http_key \002b\017\n\r\n\tBearerJwt\022" +
"\000r:\n\033Nakama server documentation\022\033https:" +
"//heroiclabs.com/docsb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.AnnotationsProto.getDescriptor(),
com.google.protobuf.EmptyProto.getDescriptor(),
com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(),
com.heroiclabs.nakama.api.ApiProto.getDescriptor(),
});
descriptor.resolveAllFeaturesImmutable();
com.google.api.AnnotationsProto.getDescriptor();
com.google.protobuf.EmptyProto.getDescriptor();
com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor();
com.heroiclabs.nakama.api.ApiProto.getDescriptor();
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.AnnotationsProto.http);
registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation);
registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
}
// @@protoc_insertion_point(outer_class_scope)
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateAppleRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateAppleRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The Apple account details.
* </pre>
*
* <code>.nakama.api.AccountApple account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The Apple account details.
* </pre>
*
* <code>.nakama.api.AccountApple account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountApple getAccount();
/**
* <pre>
* The Apple account details.
* </pre>
*
* <code>.nakama.api.AccountApple account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountAppleOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateCustomRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateCustomRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The custom account details.
* </pre>
*
* <code>.nakama.api.AccountCustom account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The custom account details.
* </pre>
*
* <code>.nakama.api.AccountCustom account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountCustom getAccount();
/**
* <pre>
* The custom account details.
* </pre>
*
* <code>.nakama.api.AccountCustom account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountCustomOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateDeviceRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateDeviceRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The device account details.
* </pre>
*
* <code>.nakama.api.AccountDevice account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The device account details.
* </pre>
*
* <code>.nakama.api.AccountDevice account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountDevice getAccount();
/**
* <pre>
* The device account details.
* </pre>
*
* <code>.nakama.api.AccountDevice account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountDeviceOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateEmailRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateEmailRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The email account details.
* </pre>
*
* <code>.nakama.api.AccountEmail account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The email account details.
* </pre>
*
* <code>.nakama.api.AccountEmail account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountEmail getAccount();
/**
* <pre>
* The email account details.
* </pre>
*
* <code>.nakama.api.AccountEmail account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountEmailOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
}
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateFacebookInstantGameRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateFacebookInstantGameRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The Facebook Instant Game account details.
* </pre>
*
* <code>.nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The Facebook Instant Game account details.
* </pre>
*
* <code>.nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountFacebookInstantGame getAccount();
/**
* <pre>
* The Facebook Instant Game account details.
* </pre>
*
* <code>.nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,112 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateFacebookRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateFacebookRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The Facebook account details.
* </pre>
*
* <code>.nakama.api.AccountFacebook account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The Facebook account details.
* </pre>
*
* <code>.nakama.api.AccountFacebook account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountFacebook getAccount();
/**
* <pre>
* The Facebook account details.
* </pre>
*
* <code>.nakama.api.AccountFacebook account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
/**
* <pre>
* Import Facebook friends for the user.
* </pre>
*
* <code>.google.protobuf.BoolValue sync = 4 [json_name = "sync"];</code>
* @return Whether the sync field is set.
*/
boolean hasSync();
/**
* <pre>
* Import Facebook friends for the user.
* </pre>
*
* <code>.google.protobuf.BoolValue sync = 4 [json_name = "sync"];</code>
* @return The sync.
*/
com.google.protobuf.BoolValue getSync();
/**
* <pre>
* Import Facebook friends for the user.
* </pre>
*
* <code>.google.protobuf.BoolValue sync = 4 [json_name = "sync"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateGameCenterRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateGameCenterRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The Game Center account details.
* </pre>
*
* <code>.nakama.api.AccountGameCenter account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The Game Center account details.
* </pre>
*
* <code>.nakama.api.AccountGameCenter account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountGameCenter getAccount();
/**
* <pre>
* The Game Center account details.
* </pre>
*
* <code>.nakama.api.AccountGameCenter account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountGameCenterOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,85 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateGoogleRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateGoogleRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The Google account details.
* </pre>
*
* <code>.nakama.api.AccountGoogle account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The Google account details.
* </pre>
*
* <code>.nakama.api.AccountGoogle account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountGoogle getAccount();
/**
* <pre>
* The Google account details.
* </pre>
*
* <code>.nakama.api.AccountGoogle account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountGoogleOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,112 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
public interface AuthenticateSteamRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateSteamRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The Steam account details.
* </pre>
*
* <code>.nakama.api.AccountSteam account = 1 [json_name = "account"];</code>
* @return Whether the account field is set.
*/
boolean hasAccount();
/**
* <pre>
* The Steam account details.
* </pre>
*
* <code>.nakama.api.AccountSteam account = 1 [json_name = "account"];</code>
* @return The account.
*/
com.heroiclabs.nakama.api.AccountSteam getAccount();
/**
* <pre>
* The Steam account details.
* </pre>
*
* <code>.nakama.api.AccountSteam account = 1 [json_name = "account"];</code>
*/
com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return Whether the create field is set.
*/
boolean hasCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
* @return The create.
*/
com.google.protobuf.BoolValue getCreate();
/**
* <pre>
* Register the account if the user does not already exist.
* </pre>
*
* <code>.google.protobuf.BoolValue create = 2 [json_name = "create"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The username.
*/
java.lang.String getUsername();
/**
* <pre>
* Set the username on the account at register. Must be unique.
* </pre>
*
* <code>string username = 3 [json_name = "username"];</code>
* @return The bytes for username.
*/
com.google.protobuf.ByteString
getUsernameBytes();
/**
* <pre>
* Import Steam friends for the user.
* </pre>
*
* <code>.google.protobuf.BoolValue sync = 4 [json_name = "sync"];</code>
* @return Whether the sync field is set.
*/
boolean hasSync();
/**
* <pre>
* Import Steam friends for the user.
* </pre>
*
* <code>.google.protobuf.BoolValue sync = 4 [json_name = "sync"];</code>
* @return The sync.
*/
com.google.protobuf.BoolValue getSync();
/**
* <pre>
* Import Steam friends for the user.
* </pre>
*
* <code>.google.protobuf.BoolValue sync = 4 [json_name = "sync"];</code>
*/
com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder();
}
@@ -0,0 +1,778 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/heroiclabs/nakama-common/api/api.proto
// Protobuf Java Version: 4.28.2
package com.heroiclabs.nakama.api;
/**
* <pre>
* Ban users from a group.
* </pre>
*
* Protobuf type {@code nakama.api.BanGroupUsersRequest}
*/
public final class BanGroupUsersRequest extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:nakama.api.BanGroupUsersRequest)
BanGroupUsersRequestOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
BanGroupUsersRequest.class.getName());
}
// Use BanGroupUsersRequest.newBuilder() to construct.
private BanGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private BanGroupUsersRequest() {
groupId_ = "";
userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.BanGroupUsersRequest.class, com.heroiclabs.nakama.api.BanGroupUsersRequest.Builder.class);
}
public static final int GROUP_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object groupId_ = "";
/**
* <pre>
* The group to ban users from.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The groupId.
*/
@java.lang.Override
public java.lang.String getGroupId() {
java.lang.Object ref = groupId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
groupId_ = s;
return s;
}
}
/**
* <pre>
* The group to ban users from.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The bytes for groupId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getGroupIdBytes() {
java.lang.Object ref = groupId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
groupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_IDS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return A list containing the userIds.
*/
public com.google.protobuf.ProtocolStringList
getUserIdsList() {
return userIds_;
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return The count of userIds.
*/
public int getUserIdsCount() {
return userIds_.size();
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_);
}
for (int i = 0; i < userIds_.size(); i++) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, userIds_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_);
}
{
int dataSize = 0;
for (int i = 0; i < userIds_.size(); i++) {
dataSize += computeStringSizeNoTag(userIds_.getRaw(i));
}
size += dataSize;
size += 1 * getUserIdsList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.heroiclabs.nakama.api.BanGroupUsersRequest)) {
return super.equals(obj);
}
com.heroiclabs.nakama.api.BanGroupUsersRequest other = (com.heroiclabs.nakama.api.BanGroupUsersRequest) obj;
if (!getGroupId()
.equals(other.getGroupId())) return false;
if (!getUserIdsList()
.equals(other.getUserIdsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
hash = (53 * hash) + getGroupId().hashCode();
if (getUserIdsCount() > 0) {
hash = (37 * hash) + USER_IDS_FIELD_NUMBER;
hash = (53 * hash) + getUserIdsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.heroiclabs.nakama.api.BanGroupUsersRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Ban users from a group.
* </pre>
*
* Protobuf type {@code nakama.api.BanGroupUsersRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:nakama.api.BanGroupUsersRequest)
com.heroiclabs.nakama.api.BanGroupUsersRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.heroiclabs.nakama.api.BanGroupUsersRequest.class, com.heroiclabs.nakama.api.BanGroupUsersRequest.Builder.class);
}
// Construct using com.heroiclabs.nakama.api.BanGroupUsersRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
groupId_ = "";
userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_descriptor;
}
@java.lang.Override
public com.heroiclabs.nakama.api.BanGroupUsersRequest getDefaultInstanceForType() {
return com.heroiclabs.nakama.api.BanGroupUsersRequest.getDefaultInstance();
}
@java.lang.Override
public com.heroiclabs.nakama.api.BanGroupUsersRequest build() {
com.heroiclabs.nakama.api.BanGroupUsersRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.heroiclabs.nakama.api.BanGroupUsersRequest buildPartial() {
com.heroiclabs.nakama.api.BanGroupUsersRequest result = new com.heroiclabs.nakama.api.BanGroupUsersRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.heroiclabs.nakama.api.BanGroupUsersRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.groupId_ = groupId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
userIds_.makeImmutable();
result.userIds_ = userIds_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.heroiclabs.nakama.api.BanGroupUsersRequest) {
return mergeFrom((com.heroiclabs.nakama.api.BanGroupUsersRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.heroiclabs.nakama.api.BanGroupUsersRequest other) {
if (other == com.heroiclabs.nakama.api.BanGroupUsersRequest.getDefaultInstance()) return this;
if (!other.getGroupId().isEmpty()) {
groupId_ = other.groupId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.userIds_.isEmpty()) {
if (userIds_.isEmpty()) {
userIds_ = other.userIds_;
bitField0_ |= 0x00000002;
} else {
ensureUserIdsIsMutable();
userIds_.addAll(other.userIds_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
groupId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensureUserIdsIsMutable();
userIds_.add(s);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object groupId_ = "";
/**
* <pre>
* The group to ban users from.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The groupId.
*/
public java.lang.String getGroupId() {
java.lang.Object ref = groupId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
groupId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* The group to ban users from.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return The bytes for groupId.
*/
public com.google.protobuf.ByteString
getGroupIdBytes() {
java.lang.Object ref = groupId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
groupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* The group to ban users from.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @param value The groupId to set.
* @return This builder for chaining.
*/
public Builder setGroupId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
groupId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* <pre>
* The group to ban users from.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @return This builder for chaining.
*/
public Builder clearGroupId() {
groupId_ = getDefaultInstance().getGroupId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* The group to ban users from.
* </pre>
*
* <code>string group_id = 1 [json_name = "groupId"];</code>
* @param value The bytes for groupId to set.
* @return This builder for chaining.
*/
public Builder setGroupIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
groupId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureUserIdsIsMutable() {
if (!userIds_.isModifiable()) {
userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_);
}
bitField0_ |= 0x00000002;
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return A list containing the userIds.
*/
public com.google.protobuf.ProtocolStringList
getUserIdsList() {
userIds_.makeImmutable();
return userIds_;
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return The count of userIds.
*/
public int getUserIdsCount() {
return userIds_.size();
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param index The index to set the value at.
* @param value The userIds to set.
* @return This builder for chaining.
*/
public Builder setUserIds(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureUserIdsIsMutable();
userIds_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param value The userIds to add.
* @return This builder for chaining.
*/
public Builder addUserIds(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureUserIdsIsMutable();
userIds_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param values The userIds to add.
* @return This builder for chaining.
*/
public Builder addAllUserIds(
java.lang.Iterable<java.lang.String> values) {
ensureUserIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, userIds_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @return This builder for chaining.
*/
public Builder clearUserIds() {
userIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
* <pre>
* The users to ban.
* </pre>
*
* <code>repeated string user_ids = 2 [json_name = "userIds"];</code>
* @param value The bytes of the userIds to add.
* @return This builder for chaining.
*/
public Builder addUserIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureUserIdsIsMutable();
userIds_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:nakama.api.BanGroupUsersRequest)
}
// @@protoc_insertion_point(class_scope:nakama.api.BanGroupUsersRequest)
private static final com.heroiclabs.nakama.api.BanGroupUsersRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.BanGroupUsersRequest();
}
public static com.heroiclabs.nakama.api.BanGroupUsersRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BanGroupUsersRequest>
PARSER = new com.google.protobuf.AbstractParser<BanGroupUsersRequest>() {
@java.lang.Override
public BanGroupUsersRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<BanGroupUsersRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BanGroupUsersRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.heroiclabs.nakama.api.BanGroupUsersRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
Loaded 100 of 442 files, more files were not shown because too many files have changed in this diff. Show more