org.openfeed.Status Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: openfeed_api.proto
// Protobuf Java Version: 4.28.3
package org.openfeed;
/**
*
* //////////////////
* Serivce Messages
* /////////////////
*
*
* Protobuf type {@code org.openfeed.Status}
*/
public final class Status extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:org.openfeed.Status)
StatusOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 3,
/* suffix= */ "",
Status.class.getName());
}
// Use Status.newBuilder() to construct.
private Status(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private Status() {
result_ = 0;
message_ = "";
service_ = 0;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_Status_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_Status_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.openfeed.Status.class, org.openfeed.Status.Builder.class);
}
public static final int RESULT_FIELD_NUMBER = 1;
private int result_ = 0;
/**
* .org.openfeed.Result result = 1;
* @return The enum numeric value on the wire for result.
*/
@java.lang.Override public int getResultValue() {
return result_;
}
/**
* .org.openfeed.Result result = 1;
* @return The result.
*/
@java.lang.Override public org.openfeed.Result getResult() {
org.openfeed.Result result = org.openfeed.Result.forNumber(result_);
return result == null ? org.openfeed.Result.UNRECOGNIZED : result;
}
public static final int MESSAGE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object message_ = "";
/**
* string message = 2;
* @return The message.
*/
@java.lang.Override
public java.lang.String getMessage() {
java.lang.Object ref = message_;
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();
message_ = s;
return s;
}
}
/**
* string message = 2;
* @return The bytes for message.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SERVICE_FIELD_NUMBER = 3;
private int service_ = 0;
/**
* .org.openfeed.Service service = 3;
* @return The enum numeric value on the wire for service.
*/
@java.lang.Override public int getServiceValue() {
return service_;
}
/**
* .org.openfeed.Service service = 3;
* @return The service.
*/
@java.lang.Override public org.openfeed.Service getService() {
org.openfeed.Service result = org.openfeed.Service.forNumber(service_);
return result == null ? org.openfeed.Service.UNRECOGNIZED : result;
}
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 (result_ != org.openfeed.Result.UNKNOWN_RESULT.getNumber()) {
output.writeEnum(1, result_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, message_);
}
if (service_ != org.openfeed.Service.UNKNOWN_SERVICE.getNumber()) {
output.writeEnum(3, service_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (result_ != org.openfeed.Result.UNKNOWN_RESULT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, result_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_);
}
if (service_ != org.openfeed.Service.UNKNOWN_SERVICE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, service_);
}
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 org.openfeed.Status)) {
return super.equals(obj);
}
org.openfeed.Status other = (org.openfeed.Status) obj;
if (result_ != other.result_) return false;
if (!getMessage()
.equals(other.getMessage())) return false;
if (service_ != other.service_) 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) + RESULT_FIELD_NUMBER;
hash = (53 * hash) + result_;
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + service_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.openfeed.Status parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.openfeed.Status parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.openfeed.Status parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.openfeed.Status parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.openfeed.Status parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.openfeed.Status parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.openfeed.Status parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.openfeed.Status 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 org.openfeed.Status parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.openfeed.Status 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 org.openfeed.Status parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.openfeed.Status 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(org.openfeed.Status 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;
}
/**
*
* //////////////////
* Serivce Messages
* /////////////////
*
*
* Protobuf type {@code org.openfeed.Status}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:org.openfeed.Status)
org.openfeed.StatusOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_Status_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_Status_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.openfeed.Status.class, org.openfeed.Status.Builder.class);
}
// Construct using org.openfeed.Status.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
result_ = 0;
message_ = "";
service_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_Status_descriptor;
}
@java.lang.Override
public org.openfeed.Status getDefaultInstanceForType() {
return org.openfeed.Status.getDefaultInstance();
}
@java.lang.Override
public org.openfeed.Status build() {
org.openfeed.Status result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.openfeed.Status buildPartial() {
org.openfeed.Status result = new org.openfeed.Status(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.openfeed.Status result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.result_ = result_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.message_ = message_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.service_ = service_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.openfeed.Status) {
return mergeFrom((org.openfeed.Status)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.openfeed.Status other) {
if (other == org.openfeed.Status.getDefaultInstance()) return this;
if (other.result_ != 0) {
setResultValue(other.getResultValue());
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.service_ != 0) {
setServiceValue(other.getServiceValue());
}
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 8: {
result_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
message_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
service_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
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 int result_ = 0;
/**
* .org.openfeed.Result result = 1;
* @return The enum numeric value on the wire for result.
*/
@java.lang.Override public int getResultValue() {
return result_;
}
/**
* .org.openfeed.Result result = 1;
* @param value The enum numeric value on the wire for result to set.
* @return This builder for chaining.
*/
public Builder setResultValue(int value) {
result_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .org.openfeed.Result result = 1;
* @return The result.
*/
@java.lang.Override
public org.openfeed.Result getResult() {
org.openfeed.Result result = org.openfeed.Result.forNumber(result_);
return result == null ? org.openfeed.Result.UNRECOGNIZED : result;
}
/**
* .org.openfeed.Result result = 1;
* @param value The result to set.
* @return This builder for chaining.
*/
public Builder setResult(org.openfeed.Result value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
result_ = value.getNumber();
onChanged();
return this;
}
/**
* .org.openfeed.Result result = 1;
* @return This builder for chaining.
*/
public Builder clearResult() {
bitField0_ = (bitField0_ & ~0x00000001);
result_ = 0;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
* string message = 2;
* @return The message.
*/
public java.lang.String getMessage() {
java.lang.Object ref = message_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
message_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string message = 2;
* @return The bytes for message.
*/
public com.google.protobuf.ByteString
getMessageBytes() {
java.lang.Object ref = message_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
message_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string message = 2;
* @param value The message to set.
* @return This builder for chaining.
*/
public Builder setMessage(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
message_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string message = 2;
* @return This builder for chaining.
*/
public Builder clearMessage() {
message_ = getDefaultInstance().getMessage();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string message = 2;
* @param value The bytes for message to set.
* @return This builder for chaining.
*/
public Builder setMessageBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
message_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int service_ = 0;
/**
* .org.openfeed.Service service = 3;
* @return The enum numeric value on the wire for service.
*/
@java.lang.Override public int getServiceValue() {
return service_;
}
/**
* .org.openfeed.Service service = 3;
* @param value The enum numeric value on the wire for service to set.
* @return This builder for chaining.
*/
public Builder setServiceValue(int value) {
service_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .org.openfeed.Service service = 3;
* @return The service.
*/
@java.lang.Override
public org.openfeed.Service getService() {
org.openfeed.Service result = org.openfeed.Service.forNumber(service_);
return result == null ? org.openfeed.Service.UNRECOGNIZED : result;
}
/**
* .org.openfeed.Service service = 3;
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(org.openfeed.Service value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
service_ = value.getNumber();
onChanged();
return this;
}
/**
* .org.openfeed.Service service = 3;
* @return This builder for chaining.
*/
public Builder clearService() {
bitField0_ = (bitField0_ & ~0x00000004);
service_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:org.openfeed.Status)
}
// @@protoc_insertion_point(class_scope:org.openfeed.Status)
private static final org.openfeed.Status DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.openfeed.Status();
}
public static org.openfeed.Status getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Status 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 parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.openfeed.Status getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy