com.diozero.remote.message.protobuf.BooleanResponse Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: diozero.proto
// Protobuf Java Version: 4.28.2
package com.diozero.remote.message.protobuf;
/**
* Protobuf type {@code diozero.BooleanResponse}
*/
public final class BooleanResponse extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:diozero.BooleanResponse)
BooleanResponseOrBuilder {
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= */ "",
BooleanResponse.class.getName());
}
// Use BooleanResponse.newBuilder() to construct.
private BooleanResponse(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private BooleanResponse() {
status_ = 0;
detail_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.diozero.remote.message.protobuf.Diozero.internal_static_diozero_BooleanResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.diozero.remote.message.protobuf.Diozero.internal_static_diozero_BooleanResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.diozero.remote.message.protobuf.BooleanResponse.class, com.diozero.remote.message.protobuf.BooleanResponse.Builder.class);
}
public static final int STATUS_FIELD_NUMBER = 1;
private int status_ = 0;
/**
* .diozero.Status status = 1;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .diozero.Status status = 1;
* @return The status.
*/
@java.lang.Override public com.diozero.remote.message.protobuf.Status getStatus() {
com.diozero.remote.message.protobuf.Status result = com.diozero.remote.message.protobuf.Status.forNumber(status_);
return result == null ? com.diozero.remote.message.protobuf.Status.UNRECOGNIZED : result;
}
public static final int DETAIL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object detail_ = "";
/**
* string detail = 2;
* @return The detail.
*/
@java.lang.Override
public java.lang.String getDetail() {
java.lang.Object ref = detail_;
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();
detail_ = s;
return s;
}
}
/**
* string detail = 2;
* @return The bytes for detail.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDetailBytes() {
java.lang.Object ref = detail_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
detail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DATA_FIELD_NUMBER = 3;
private boolean data_ = false;
/**
* bool data = 3;
* @return The data.
*/
@java.lang.Override
public boolean getData() {
return data_;
}
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 (status_ != com.diozero.remote.message.protobuf.Status.OK.getNumber()) {
output.writeEnum(1, status_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(detail_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, detail_);
}
if (data_ != false) {
output.writeBool(3, data_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (status_ != com.diozero.remote.message.protobuf.Status.OK.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, status_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(detail_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, detail_);
}
if (data_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, data_);
}
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.diozero.remote.message.protobuf.BooleanResponse)) {
return super.equals(obj);
}
com.diozero.remote.message.protobuf.BooleanResponse other = (com.diozero.remote.message.protobuf.BooleanResponse) obj;
if (status_ != other.status_) return false;
if (!getDetail()
.equals(other.getDetail())) return false;
if (getData()
!= other.getData()) 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) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
hash = (37 * hash) + DETAIL_FIELD_NUMBER;
hash = (53 * hash) + getDetail().hashCode();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getData());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.diozero.remote.message.protobuf.BooleanResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.diozero.remote.message.protobuf.BooleanResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.diozero.remote.message.protobuf.BooleanResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.diozero.remote.message.protobuf.BooleanResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.diozero.remote.message.protobuf.BooleanResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.diozero.remote.message.protobuf.BooleanResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.diozero.remote.message.protobuf.BooleanResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.diozero.remote.message.protobuf.BooleanResponse 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.diozero.remote.message.protobuf.BooleanResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.diozero.remote.message.protobuf.BooleanResponse 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.diozero.remote.message.protobuf.BooleanResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.diozero.remote.message.protobuf.BooleanResponse 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.diozero.remote.message.protobuf.BooleanResponse 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;
}
/**
* Protobuf type {@code diozero.BooleanResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:diozero.BooleanResponse)
com.diozero.remote.message.protobuf.BooleanResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.diozero.remote.message.protobuf.Diozero.internal_static_diozero_BooleanResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.diozero.remote.message.protobuf.Diozero.internal_static_diozero_BooleanResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.diozero.remote.message.protobuf.BooleanResponse.class, com.diozero.remote.message.protobuf.BooleanResponse.Builder.class);
}
// Construct using com.diozero.remote.message.protobuf.BooleanResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
status_ = 0;
detail_ = "";
data_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.diozero.remote.message.protobuf.Diozero.internal_static_diozero_BooleanResponse_descriptor;
}
@java.lang.Override
public com.diozero.remote.message.protobuf.BooleanResponse getDefaultInstanceForType() {
return com.diozero.remote.message.protobuf.BooleanResponse.getDefaultInstance();
}
@java.lang.Override
public com.diozero.remote.message.protobuf.BooleanResponse build() {
com.diozero.remote.message.protobuf.BooleanResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.diozero.remote.message.protobuf.BooleanResponse buildPartial() {
com.diozero.remote.message.protobuf.BooleanResponse result = new com.diozero.remote.message.protobuf.BooleanResponse(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.diozero.remote.message.protobuf.BooleanResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.status_ = status_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.detail_ = detail_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.data_ = data_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.diozero.remote.message.protobuf.BooleanResponse) {
return mergeFrom((com.diozero.remote.message.protobuf.BooleanResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.diozero.remote.message.protobuf.BooleanResponse other) {
if (other == com.diozero.remote.message.protobuf.BooleanResponse.getDefaultInstance()) return this;
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (!other.getDetail().isEmpty()) {
detail_ = other.detail_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getData() != false) {
setData(other.getData());
}
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: {
status_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
detail_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
data_ = input.readBool();
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 status_ = 0;
/**
* .diozero.Status status = 1;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .diozero.Status status = 1;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .diozero.Status status = 1;
* @return The status.
*/
@java.lang.Override
public com.diozero.remote.message.protobuf.Status getStatus() {
com.diozero.remote.message.protobuf.Status result = com.diozero.remote.message.protobuf.Status.forNumber(status_);
return result == null ? com.diozero.remote.message.protobuf.Status.UNRECOGNIZED : result;
}
/**
* .diozero.Status status = 1;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(com.diozero.remote.message.protobuf.Status value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
status_ = value.getNumber();
onChanged();
return this;
}
/**
* .diozero.Status status = 1;
* @return This builder for chaining.
*/
public Builder clearStatus() {
bitField0_ = (bitField0_ & ~0x00000001);
status_ = 0;
onChanged();
return this;
}
private java.lang.Object detail_ = "";
/**
* string detail = 2;
* @return The detail.
*/
public java.lang.String getDetail() {
java.lang.Object ref = detail_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
detail_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string detail = 2;
* @return The bytes for detail.
*/
public com.google.protobuf.ByteString
getDetailBytes() {
java.lang.Object ref = detail_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
detail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string detail = 2;
* @param value The detail to set.
* @return This builder for chaining.
*/
public Builder setDetail(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
detail_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string detail = 2;
* @return This builder for chaining.
*/
public Builder clearDetail() {
detail_ = getDefaultInstance().getDetail();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string detail = 2;
* @param value The bytes for detail to set.
* @return This builder for chaining.
*/
public Builder setDetailBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
detail_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private boolean data_ ;
/**
* bool data = 3;
* @return The data.
*/
@java.lang.Override
public boolean getData() {
return data_;
}
/**
* bool data = 3;
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(boolean value) {
data_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* bool data = 3;
* @return This builder for chaining.
*/
public Builder clearData() {
bitField0_ = (bitField0_ & ~0x00000004);
data_ = false;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:diozero.BooleanResponse)
}
// @@protoc_insertion_point(class_scope:diozero.BooleanResponse)
private static final com.diozero.remote.message.protobuf.BooleanResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.diozero.remote.message.protobuf.BooleanResponse();
}
public static com.diozero.remote.message.protobuf.BooleanResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BooleanResponse 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 com.diozero.remote.message.protobuf.BooleanResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy