main.java.com.streamlayer.interactive.common.AnswerVotesStats Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sl-protofiles Show documentation
Show all versions of sl-protofiles Show documentation
StreamLayer Java Protofiles
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: streamlayer/interactive/interactive.common.proto
// Protobuf Java Version: 3.25.3
package com.streamlayer.interactive.common;
/**
* Protobuf type {@code streamlayer.interactive.AnswerVotesStats}
*/
public final class AnswerVotesStats extends
com.google.protobuf.GeneratedMessageLite<
AnswerVotesStats, AnswerVotesStats.Builder> implements
// @@protoc_insertion_point(message_implements:streamlayer.interactive.AnswerVotesStats)
AnswerVotesStatsOrBuilder {
private AnswerVotesStats() {
answerId_ = "";
}
public interface AnswerVotesDataOrBuilder extends
// @@protoc_insertion_point(interface_extends:streamlayer.interactive.AnswerVotesStats.AnswerVotesData)
com.google.protobuf.MessageLiteOrBuilder {
/**
* uint32 count = 1 [json_name = "count"];
* @return The count.
*/
int getCount();
/**
* uint32 percentage = 2 [json_name = "percentage"];
* @return The percentage.
*/
int getPercentage();
}
/**
* Protobuf type {@code streamlayer.interactive.AnswerVotesStats.AnswerVotesData}
*/
public static final class AnswerVotesData extends
com.google.protobuf.GeneratedMessageLite<
AnswerVotesData, AnswerVotesData.Builder> implements
// @@protoc_insertion_point(message_implements:streamlayer.interactive.AnswerVotesStats.AnswerVotesData)
AnswerVotesDataOrBuilder {
private AnswerVotesData() {
}
public static final int COUNT_FIELD_NUMBER = 1;
private int count_;
/**
* uint32 count = 1 [json_name = "count"];
* @return The count.
*/
@java.lang.Override
public int getCount() {
return count_;
}
/**
* uint32 count = 1 [json_name = "count"];
* @param value The count to set.
*/
private void setCount(int value) {
count_ = value;
}
/**
* uint32 count = 1 [json_name = "count"];
*/
private void clearCount() {
count_ = 0;
}
public static final int PERCENTAGE_FIELD_NUMBER = 2;
private int percentage_;
/**
* uint32 percentage = 2 [json_name = "percentage"];
* @return The percentage.
*/
@java.lang.Override
public int getPercentage() {
return percentage_;
}
/**
* uint32 percentage = 2 [json_name = "percentage"];
* @param value The percentage to set.
*/
private void setPercentage(int value) {
percentage_ = value;
}
/**
* uint32 percentage = 2 [json_name = "percentage"];
*/
private void clearPercentage() {
percentage_ = 0;
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code streamlayer.interactive.AnswerVotesStats.AnswerVotesData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData, Builder> implements
// @@protoc_insertion_point(builder_implements:streamlayer.interactive.AnswerVotesStats.AnswerVotesData)
com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesDataOrBuilder {
// Construct using com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* uint32 count = 1 [json_name = "count"];
* @return The count.
*/
@java.lang.Override
public int getCount() {
return instance.getCount();
}
/**
* uint32 count = 1 [json_name = "count"];
* @param value The count to set.
* @return This builder for chaining.
*/
public Builder setCount(int value) {
copyOnWrite();
instance.setCount(value);
return this;
}
/**
* uint32 count = 1 [json_name = "count"];
* @return This builder for chaining.
*/
public Builder clearCount() {
copyOnWrite();
instance.clearCount();
return this;
}
/**
* uint32 percentage = 2 [json_name = "percentage"];
* @return The percentage.
*/
@java.lang.Override
public int getPercentage() {
return instance.getPercentage();
}
/**
* uint32 percentage = 2 [json_name = "percentage"];
* @param value The percentage to set.
* @return This builder for chaining.
*/
public Builder setPercentage(int value) {
copyOnWrite();
instance.setPercentage(value);
return this;
}
/**
* uint32 percentage = 2 [json_name = "percentage"];
* @return This builder for chaining.
*/
public Builder clearPercentage() {
copyOnWrite();
instance.clearPercentage();
return this;
}
// @@protoc_insertion_point(builder_scope:streamlayer.interactive.AnswerVotesStats.AnswerVotesData)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"count_",
"percentage_",
};
java.lang.String info =
"\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u000b\u0002\u000b" +
"";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:streamlayer.interactive.AnswerVotesStats.AnswerVotesData)
private static final com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData DEFAULT_INSTANCE;
static {
AnswerVotesData defaultInstance = new AnswerVotesData();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
AnswerVotesData.class, defaultInstance);
}
public static com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
private int bitField0_;
public static final int ANSWER_ID_FIELD_NUMBER = 1;
private java.lang.String answerId_;
/**
* string answer_id = 1 [json_name = "answerId"];
* @return The answerId.
*/
@java.lang.Override
public java.lang.String getAnswerId() {
return answerId_;
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @return The bytes for answerId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnswerIdBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(answerId_);
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @param value The answerId to set.
*/
private void setAnswerId(
java.lang.String value) {
java.lang.Class> valueClass = value.getClass();
answerId_ = value;
}
/**
* string answer_id = 1 [json_name = "answerId"];
*/
private void clearAnswerId() {
answerId_ = getDefaultInstance().getAnswerId();
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @param value The bytes for answerId to set.
*/
private void setAnswerIdBytes(
com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
answerId_ = value.toStringUtf8();
}
public static final int VOTES_FIELD_NUMBER = 2;
private com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData votes_;
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
@java.lang.Override
public boolean hasVotes() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
@java.lang.Override
public com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData getVotes() {
return votes_ == null ? com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData.getDefaultInstance() : votes_;
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
private void setVotes(com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData value) {
value.getClass();
votes_ = value;
bitField0_ |= 0x00000001;
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeVotes(com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData value) {
value.getClass();
if (votes_ != null &&
votes_ != com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData.getDefaultInstance()) {
votes_ =
com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData.newBuilder(votes_).mergeFrom(value).buildPartial();
} else {
votes_ = value;
}
bitField0_ |= 0x00000001;
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
private void clearVotes() { votes_ = null;
bitField0_ = (bitField0_ & ~0x00000001);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.interactive.common.AnswerVotesStats parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.streamlayer.interactive.common.AnswerVotesStats prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code streamlayer.interactive.AnswerVotesStats}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.streamlayer.interactive.common.AnswerVotesStats, Builder> implements
// @@protoc_insertion_point(builder_implements:streamlayer.interactive.AnswerVotesStats)
com.streamlayer.interactive.common.AnswerVotesStatsOrBuilder {
// Construct using com.streamlayer.interactive.common.AnswerVotesStats.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @return The answerId.
*/
@java.lang.Override
public java.lang.String getAnswerId() {
return instance.getAnswerId();
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @return The bytes for answerId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnswerIdBytes() {
return instance.getAnswerIdBytes();
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @param value The answerId to set.
* @return This builder for chaining.
*/
public Builder setAnswerId(
java.lang.String value) {
copyOnWrite();
instance.setAnswerId(value);
return this;
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @return This builder for chaining.
*/
public Builder clearAnswerId() {
copyOnWrite();
instance.clearAnswerId();
return this;
}
/**
* string answer_id = 1 [json_name = "answerId"];
* @param value The bytes for answerId to set.
* @return This builder for chaining.
*/
public Builder setAnswerIdBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setAnswerIdBytes(value);
return this;
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
@java.lang.Override
public boolean hasVotes() {
return instance.hasVotes();
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
@java.lang.Override
public com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData getVotes() {
return instance.getVotes();
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
public Builder setVotes(com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData value) {
copyOnWrite();
instance.setVotes(value);
return this;
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
public Builder setVotes(
com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData.Builder builderForValue) {
copyOnWrite();
instance.setVotes(builderForValue.build());
return this;
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
public Builder mergeVotes(com.streamlayer.interactive.common.AnswerVotesStats.AnswerVotesData value) {
copyOnWrite();
instance.mergeVotes(value);
return this;
}
/**
* .streamlayer.interactive.AnswerVotesStats.AnswerVotesData votes = 2 [json_name = "votes"];
*/
public Builder clearVotes() { copyOnWrite();
instance.clearVotes();
return this;
}
// @@protoc_insertion_point(builder_scope:streamlayer.interactive.AnswerVotesStats)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.streamlayer.interactive.common.AnswerVotesStats();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"answerId_",
"votes_",
};
java.lang.String info =
"\u0000\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\u1009" +
"\u0000";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.streamlayer.interactive.common.AnswerVotesStats.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:streamlayer.interactive.AnswerVotesStats)
private static final com.streamlayer.interactive.common.AnswerVotesStats DEFAULT_INSTANCE;
static {
AnswerVotesStats defaultInstance = new AnswerVotesStats();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
AnswerVotesStats.class, defaultInstance);
}
public static com.streamlayer.interactive.common.AnswerVotesStats getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}