main.java.com.streamlayer.users.UpdatePublicNameRequest 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.UpdatePublicNameRequest}
*/
public final class UpdatePublicNameRequest extends
com.google.protobuf.GeneratedMessageLite<
UpdatePublicNameRequest, UpdatePublicNameRequest.Builder> implements
// @@protoc_insertion_point(message_implements:streamlayer.users.UpdatePublicNameRequest)
UpdatePublicNameRequestOrBuilder {
private UpdatePublicNameRequest() {
username_ = "";
}
private int nameCase_ = 0;
private java.lang.Object name_;
public enum NameCase {
SET_NAME(2),
DEL_NAME(3),
NAME_NOT_SET(0);
private final int value;
private NameCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static NameCase valueOf(int value) {
return forNumber(value);
}
public static NameCase forNumber(int value) {
switch (value) {
case 2: return SET_NAME;
case 3: return DEL_NAME;
case 0: return NAME_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
@java.lang.Override
public NameCase
getNameCase() {
return NameCase.forNumber(
nameCase_);
}
private void clearName() {
nameCase_ = 0;
name_ = 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_NAME_FIELD_NUMBER = 2;
/**
* string set_name = 2 [json_name = "setName"];
* @return Whether the setName field is set.
*/
@java.lang.Override
public boolean hasSetName() {
return nameCase_ == 2;
}
/**
* string set_name = 2 [json_name = "setName"];
* @return The setName.
*/
@java.lang.Override
public java.lang.String getSetName() {
java.lang.String ref = "";
if (nameCase_ == 2) {
ref = (java.lang.String) name_;
}
return ref;
}
/**
* string set_name = 2 [json_name = "setName"];
* @return The bytes for setName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSetNameBytes() {
java.lang.String ref = "";
if (nameCase_ == 2) {
ref = (java.lang.String) name_;
}
return com.google.protobuf.ByteString.copyFromUtf8(ref);
}
/**
* string set_name = 2 [json_name = "setName"];
* @param value The setName to set.
*/
private void setSetName(
java.lang.String value) {
java.lang.Class> valueClass = value.getClass();
nameCase_ = 2;
name_ = value;
}
/**
* string set_name = 2 [json_name = "setName"];
*/
private void clearSetName() {
if (nameCase_ == 2) {
nameCase_ = 0;
name_ = null;
}
}
/**
* string set_name = 2 [json_name = "setName"];
* @param value The bytes for setName to set.
*/
private void setSetNameBytes(
com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
name_ = value.toStringUtf8();
nameCase_ = 2;
}
public static final int DEL_NAME_FIELD_NUMBER = 3;
/**
* string del_name = 3 [json_name = "delName"];
* @return Whether the delName field is set.
*/
@java.lang.Override
public boolean hasDelName() {
return nameCase_ == 3;
}
/**
* string del_name = 3 [json_name = "delName"];
* @return The delName.
*/
@java.lang.Override
public java.lang.String getDelName() {
java.lang.String ref = "";
if (nameCase_ == 3) {
ref = (java.lang.String) name_;
}
return ref;
}
/**
* string del_name = 3 [json_name = "delName"];
* @return The bytes for delName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDelNameBytes() {
java.lang.String ref = "";
if (nameCase_ == 3) {
ref = (java.lang.String) name_;
}
return com.google.protobuf.ByteString.copyFromUtf8(ref);
}
/**
* string del_name = 3 [json_name = "delName"];
* @param value The delName to set.
*/
private void setDelName(
java.lang.String value) {
java.lang.Class> valueClass = value.getClass();
nameCase_ = 3;
name_ = value;
}
/**
* string del_name = 3 [json_name = "delName"];
*/
private void clearDelName() {
if (nameCase_ == 3) {
nameCase_ = 0;
name_ = null;
}
}
/**
* string del_name = 3 [json_name = "delName"];
* @param value The bytes for delName to set.
*/
private void setDelNameBytes(
com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
name_ = value.toStringUtf8();
nameCase_ = 3;
}
public static com.streamlayer.users.UpdatePublicNameRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.users.UpdatePublicNameRequest 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.UpdatePublicNameRequest 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.UpdatePublicNameRequest 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.UpdatePublicNameRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.streamlayer.users.UpdatePublicNameRequest 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.UpdatePublicNameRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.users.UpdatePublicNameRequest 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.UpdatePublicNameRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.streamlayer.users.UpdatePublicNameRequest 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.UpdatePublicNameRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.streamlayer.users.UpdatePublicNameRequest 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.UpdatePublicNameRequest prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code streamlayer.users.UpdatePublicNameRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.streamlayer.users.UpdatePublicNameRequest, Builder> implements
// @@protoc_insertion_point(builder_implements:streamlayer.users.UpdatePublicNameRequest)
com.streamlayer.users.UpdatePublicNameRequestOrBuilder {
// Construct using com.streamlayer.users.UpdatePublicNameRequest.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
@java.lang.Override
public NameCase
getNameCase() {
return instance.getNameCase();
}
public Builder clearName() {
copyOnWrite();
instance.clearName();
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_name = 2 [json_name = "setName"];
* @return Whether the setName field is set.
*/
@java.lang.Override
public boolean hasSetName() {
return instance.hasSetName();
}
/**
* string set_name = 2 [json_name = "setName"];
* @return The setName.
*/
@java.lang.Override
public java.lang.String getSetName() {
return instance.getSetName();
}
/**
* string set_name = 2 [json_name = "setName"];
* @return The bytes for setName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSetNameBytes() {
return instance.getSetNameBytes();
}
/**
* string set_name = 2 [json_name = "setName"];
* @param value The setName to set.
* @return This builder for chaining.
*/
public Builder setSetName(
java.lang.String value) {
copyOnWrite();
instance.setSetName(value);
return this;
}
/**
* string set_name = 2 [json_name = "setName"];
* @return This builder for chaining.
*/
public Builder clearSetName() {
copyOnWrite();
instance.clearSetName();
return this;
}
/**
* string set_name = 2 [json_name = "setName"];
* @param value The bytes for setName to set.
* @return This builder for chaining.
*/
public Builder setSetNameBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setSetNameBytes(value);
return this;
}
/**
* string del_name = 3 [json_name = "delName"];
* @return Whether the delName field is set.
*/
@java.lang.Override
public boolean hasDelName() {
return instance.hasDelName();
}
/**
* string del_name = 3 [json_name = "delName"];
* @return The delName.
*/
@java.lang.Override
public java.lang.String getDelName() {
return instance.getDelName();
}
/**
* string del_name = 3 [json_name = "delName"];
* @return The bytes for delName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDelNameBytes() {
return instance.getDelNameBytes();
}
/**
* string del_name = 3 [json_name = "delName"];
* @param value The delName to set.
* @return This builder for chaining.
*/
public Builder setDelName(
java.lang.String value) {
copyOnWrite();
instance.setDelName(value);
return this;
}
/**
* string del_name = 3 [json_name = "delName"];
* @return This builder for chaining.
*/
public Builder clearDelName() {
copyOnWrite();
instance.clearDelName();
return this;
}
/**
* string del_name = 3 [json_name = "delName"];
* @param value The bytes for delName to set.
* @return This builder for chaining.
*/
public Builder setDelNameBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setDelNameBytes(value);
return this;
}
// @@protoc_insertion_point(builder_scope:streamlayer.users.UpdatePublicNameRequest)
}
@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.UpdatePublicNameRequest();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"name_",
"nameCase_",
"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.UpdatePublicNameRequest.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.UpdatePublicNameRequest)
private static final com.streamlayer.users.UpdatePublicNameRequest DEFAULT_INSTANCE;
static {
UpdatePublicNameRequest defaultInstance = new UpdatePublicNameRequest();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
UpdatePublicNameRequest.class, defaultInstance);
}
public static com.streamlayer.users.UpdatePublicNameRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}