main.java.com.streamlayer.users.UpdateAvatarRequest 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/users/users.proto
// Protobuf Java Version: 3.25.3
package com.streamlayer.users;
/**
* Protobuf type {@code streamlayer.users.UpdateAvatarRequest}
*/
public final class UpdateAvatarRequest extends
com.google.protobuf.GeneratedMessageLite<
UpdateAvatarRequest, UpdateAvatarRequest.Builder> implements
// @@protoc_insertion_point(message_implements:streamlayer.users.UpdateAvatarRequest)
UpdateAvatarRequestOrBuilder {
private UpdateAvatarRequest() {
username_ = "";
}
private int avatarCase_ = 0;
private java.lang.Object avatar_;
public enum AvatarCase {
SET_AVATAR(2),
DEL_AVATAR(3),
AVATAR_NOT_SET(0);
private final int value;
private AvatarCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AvatarCase valueOf(int value) {
return forNumber(value);
}
public static AvatarCase forNumber(int value) {
switch (value) {
case 2: return SET_AVATAR;
case 3: return DEL_AVATAR;
case 0: return AVATAR_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
@java.lang.Override
public AvatarCase
getAvatarCase() {
return AvatarCase.forNumber(
avatarCase_);
}
private void clearAvatar() {
avatarCase_ = 0;
avatar_ = null;
}
public static final int USERNAME_FIELD_NUMBER = 1;
private java.lang.String username_;
/**
* string username = 1 [json_name = "username"];
* @return The username.
*/
@java.lang.Override
public java.lang.String getUsername() {
return username_;
}
/**
* string username = 1 [json_name = "username"];
* @return The bytes for username.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUsernameBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(username_);
}
/**
* string username = 1 [json_name = "username"];
* @param value The username to set.
*/
private void setUsername(
java.lang.String value) {
java.lang.Class> valueClass = value.getClass();
username_ = value;
}
/**
* string username = 1 [json_name = "username"];
*/
private void clearUsername() {
username_ = getDefaultInstance().getUsername();
}
/**
* string username = 1 [json_name = "username"];
* @param value The bytes for username to set.
*/
private void setUsernameBytes(
com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
username_ = value.toStringUtf8();
}
public static final int SET_AVATAR_FIELD_NUMBER = 2;
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @return Whether the setAvatar field is set.
*/
@java.lang.Override
public boolean hasSetAvatar() {
return avatarCase_ == 2;
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @return The setAvatar.
*/
@java.lang.Override
public java.lang.String getSetAvatar() {
java.lang.String ref = "";
if (avatarCase_ == 2) {
ref = (java.lang.String) avatar_;
}
return ref;
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @return The bytes for setAvatar.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSetAvatarBytes() {
java.lang.String ref = "";
if (avatarCase_ == 2) {
ref = (java.lang.String) avatar_;
}
return com.google.protobuf.ByteString.copyFromUtf8(ref);
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @param value The setAvatar to set.
*/
private void setSetAvatar(
java.lang.String value) {
java.lang.Class> valueClass = value.getClass();
avatarCase_ = 2;
avatar_ = value;
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
*/
private void clearSetAvatar() {
if (avatarCase_ == 2) {
avatarCase_ = 0;
avatar_ = null;
}
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @param value The bytes for setAvatar to set.
*/
private void setSetAvatarBytes(
com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
avatar_ = value.toStringUtf8();
avatarCase_ = 2;
}
public static final int DEL_AVATAR_FIELD_NUMBER = 3;
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @return Whether the delAvatar field is set.
*/
@java.lang.Override
public boolean hasDelAvatar() {
return avatarCase_ == 3;
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @return The delAvatar.
*/
@java.lang.Override
public java.lang.String getDelAvatar() {
java.lang.String ref = "";
if (avatarCase_ == 3) {
ref = (java.lang.String) avatar_;
}
return ref;
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @return The bytes for delAvatar.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDelAvatarBytes() {
java.lang.String ref = "";
if (avatarCase_ == 3) {
ref = (java.lang.String) avatar_;
}
return com.google.protobuf.ByteString.copyFromUtf8(ref);
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @param value The delAvatar to set.
*/
private void setDelAvatar(
java.lang.String value) {
java.lang.Class> valueClass = value.getClass();
avatarCase_ = 3;
avatar_ = value;
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
*/
private void clearDelAvatar() {
if (avatarCase_ == 3) {
avatarCase_ = 0;
avatar_ = null;
}
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @param value The bytes for delAvatar to set.
*/
private void setDelAvatarBytes(
com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
avatar_ = value.toStringUtf8();
avatarCase_ = 3;
}
public static com.streamlayer.users.UpdateAvatarRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.users.UpdateAvatarRequest 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.users.UpdateAvatarRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.users.UpdateAvatarRequest 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.users.UpdateAvatarRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.users.UpdateAvatarRequest 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.users.UpdateAvatarRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.users.UpdateAvatarRequest 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.users.UpdateAvatarRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.streamlayer.users.UpdateAvatarRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.streamlayer.users.UpdateAvatarRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.users.UpdateAvatarRequest 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.users.UpdateAvatarRequest prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code streamlayer.users.UpdateAvatarRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.streamlayer.users.UpdateAvatarRequest, Builder> implements
// @@protoc_insertion_point(builder_implements:streamlayer.users.UpdateAvatarRequest)
com.streamlayer.users.UpdateAvatarRequestOrBuilder {
// Construct using com.streamlayer.users.UpdateAvatarRequest.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
@java.lang.Override
public AvatarCase
getAvatarCase() {
return instance.getAvatarCase();
}
public Builder clearAvatar() {
copyOnWrite();
instance.clearAvatar();
return this;
}
/**
* string username = 1 [json_name = "username"];
* @return The username.
*/
@java.lang.Override
public java.lang.String getUsername() {
return instance.getUsername();
}
/**
* string username = 1 [json_name = "username"];
* @return The bytes for username.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUsernameBytes() {
return instance.getUsernameBytes();
}
/**
* string username = 1 [json_name = "username"];
* @param value The username to set.
* @return This builder for chaining.
*/
public Builder setUsername(
java.lang.String value) {
copyOnWrite();
instance.setUsername(value);
return this;
}
/**
* string username = 1 [json_name = "username"];
* @return This builder for chaining.
*/
public Builder clearUsername() {
copyOnWrite();
instance.clearUsername();
return this;
}
/**
* string username = 1 [json_name = "username"];
* @param value The bytes for username to set.
* @return This builder for chaining.
*/
public Builder setUsernameBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setUsernameBytes(value);
return this;
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @return Whether the setAvatar field is set.
*/
@java.lang.Override
public boolean hasSetAvatar() {
return instance.hasSetAvatar();
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @return The setAvatar.
*/
@java.lang.Override
public java.lang.String getSetAvatar() {
return instance.getSetAvatar();
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @return The bytes for setAvatar.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSetAvatarBytes() {
return instance.getSetAvatarBytes();
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @param value The setAvatar to set.
* @return This builder for chaining.
*/
public Builder setSetAvatar(
java.lang.String value) {
copyOnWrite();
instance.setSetAvatar(value);
return this;
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @return This builder for chaining.
*/
public Builder clearSetAvatar() {
copyOnWrite();
instance.clearSetAvatar();
return this;
}
/**
* string set_avatar = 2 [json_name = "setAvatar"];
* @param value The bytes for setAvatar to set.
* @return This builder for chaining.
*/
public Builder setSetAvatarBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setSetAvatarBytes(value);
return this;
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @return Whether the delAvatar field is set.
*/
@java.lang.Override
public boolean hasDelAvatar() {
return instance.hasDelAvatar();
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @return The delAvatar.
*/
@java.lang.Override
public java.lang.String getDelAvatar() {
return instance.getDelAvatar();
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @return The bytes for delAvatar.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDelAvatarBytes() {
return instance.getDelAvatarBytes();
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @param value The delAvatar to set.
* @return This builder for chaining.
*/
public Builder setDelAvatar(
java.lang.String value) {
copyOnWrite();
instance.setDelAvatar(value);
return this;
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @return This builder for chaining.
*/
public Builder clearDelAvatar() {
copyOnWrite();
instance.clearDelAvatar();
return this;
}
/**
* string del_avatar = 3 [json_name = "delAvatar"];
* @param value The bytes for delAvatar to set.
* @return This builder for chaining.
*/
public Builder setDelAvatarBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setDelAvatarBytes(value);
return this;
}
// @@protoc_insertion_point(builder_scope:streamlayer.users.UpdateAvatarRequest)
}
@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.users.UpdateAvatarRequest();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"avatar_",
"avatarCase_",
"username_",
};
java.lang.String info =
"\u0000\u0003\u0001\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\u023b" +
"\u0000\u0003\u023b\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.users.UpdateAvatarRequest.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.users.UpdateAvatarRequest)
private static final com.streamlayer.users.UpdateAvatarRequest DEFAULT_INSTANCE;
static {
UpdateAvatarRequest defaultInstance = new UpdateAvatarRequest();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
UpdateAvatarRequest.class, defaultInstance);
}
public static com.streamlayer.users.UpdateAvatarRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}