grpc.cache_client._GetResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-protos Show documentation
Show all versions of client-protos Show documentation
Java protobuf protocols that define the Momento gRPC wire format
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: cacheclient.proto
package grpc.cache_client;
/**
* Protobuf type {@code cache_client._GetResponse}
*/
public final class _GetResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:cache_client._GetResponse)
_GetResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use _GetResponse.newBuilder() to construct.
private _GetResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _GetResponse() {
result_ = 0;
cacheBody_ = com.google.protobuf.ByteString.EMPTY;
message_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _GetResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.cache_client.Cacheclient.internal_static_cache_client__GetResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.cache_client.Cacheclient.internal_static_cache_client__GetResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.cache_client._GetResponse.class, grpc.cache_client._GetResponse.Builder.class);
}
public static final int RESULT_FIELD_NUMBER = 1;
private int result_ = 0;
/**
* .cache_client.ECacheResult result = 1;
* @return The enum numeric value on the wire for result.
*/
@java.lang.Override public int getResultValue() {
return result_;
}
/**
* .cache_client.ECacheResult result = 1;
* @return The result.
*/
@java.lang.Override public grpc.cache_client.ECacheResult getResult() {
grpc.cache_client.ECacheResult result = grpc.cache_client.ECacheResult.forNumber(result_);
return result == null ? grpc.cache_client.ECacheResult.UNRECOGNIZED : result;
}
public static final int CACHE_BODY_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString cacheBody_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes cache_body = 2;
* @return The cacheBody.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCacheBody() {
return cacheBody_;
}
public static final int MESSAGE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object message_ = "";
/**
* string message = 3;
* @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 = 3;
* @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;
}
}
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_ != grpc.cache_client.ECacheResult.Invalid.getNumber()) {
output.writeEnum(1, result_);
}
if (!cacheBody_.isEmpty()) {
output.writeBytes(2, cacheBody_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (result_ != grpc.cache_client.ECacheResult.Invalid.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, result_);
}
if (!cacheBody_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, cacheBody_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_);
}
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 grpc.cache_client._GetResponse)) {
return super.equals(obj);
}
grpc.cache_client._GetResponse other = (grpc.cache_client._GetResponse) obj;
if (result_ != other.result_) return false;
if (!getCacheBody()
.equals(other.getCacheBody())) return false;
if (!getMessage()
.equals(other.getMessage())) 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) + CACHE_BODY_FIELD_NUMBER;
hash = (53 * hash) + getCacheBody().hashCode();
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.cache_client._GetResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.cache_client._GetResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.cache_client._GetResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.cache_client._GetResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.cache_client._GetResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.cache_client._GetResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.cache_client._GetResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.cache_client._GetResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.cache_client._GetResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.cache_client._GetResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.cache_client._GetResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.cache_client._GetResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.cache_client._GetResponse 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.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code cache_client._GetResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:cache_client._GetResponse)
grpc.cache_client._GetResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.cache_client.Cacheclient.internal_static_cache_client__GetResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.cache_client.Cacheclient.internal_static_cache_client__GetResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.cache_client._GetResponse.class, grpc.cache_client._GetResponse.Builder.class);
}
// Construct using grpc.cache_client._GetResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
result_ = 0;
cacheBody_ = com.google.protobuf.ByteString.EMPTY;
message_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.cache_client.Cacheclient.internal_static_cache_client__GetResponse_descriptor;
}
@java.lang.Override
public grpc.cache_client._GetResponse getDefaultInstanceForType() {
return grpc.cache_client._GetResponse.getDefaultInstance();
}
@java.lang.Override
public grpc.cache_client._GetResponse build() {
grpc.cache_client._GetResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.cache_client._GetResponse buildPartial() {
grpc.cache_client._GetResponse result = new grpc.cache_client._GetResponse(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.cache_client._GetResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.result_ = result_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.cacheBody_ = cacheBody_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.message_ = message_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.cache_client._GetResponse) {
return mergeFrom((grpc.cache_client._GetResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.cache_client._GetResponse other) {
if (other == grpc.cache_client._GetResponse.getDefaultInstance()) return this;
if (other.result_ != 0) {
setResultValue(other.getResultValue());
}
if (other.getCacheBody() != com.google.protobuf.ByteString.EMPTY) {
setCacheBody(other.getCacheBody());
}
if (!other.getMessage().isEmpty()) {
message_ = other.message_;
bitField0_ |= 0x00000004;
onChanged();
}
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: {
cacheBody_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
message_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
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;
/**
* .cache_client.ECacheResult result = 1;
* @return The enum numeric value on the wire for result.
*/
@java.lang.Override public int getResultValue() {
return result_;
}
/**
* .cache_client.ECacheResult 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;
}
/**
* .cache_client.ECacheResult result = 1;
* @return The result.
*/
@java.lang.Override
public grpc.cache_client.ECacheResult getResult() {
grpc.cache_client.ECacheResult result = grpc.cache_client.ECacheResult.forNumber(result_);
return result == null ? grpc.cache_client.ECacheResult.UNRECOGNIZED : result;
}
/**
* .cache_client.ECacheResult result = 1;
* @param value The result to set.
* @return This builder for chaining.
*/
public Builder setResult(grpc.cache_client.ECacheResult value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
result_ = value.getNumber();
onChanged();
return this;
}
/**
* .cache_client.ECacheResult result = 1;
* @return This builder for chaining.
*/
public Builder clearResult() {
bitField0_ = (bitField0_ & ~0x00000001);
result_ = 0;
onChanged();
return this;
}
private com.google.protobuf.ByteString cacheBody_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes cache_body = 2;
* @return The cacheBody.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCacheBody() {
return cacheBody_;
}
/**
* bytes cache_body = 2;
* @param value The cacheBody to set.
* @return This builder for chaining.
*/
public Builder setCacheBody(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
cacheBody_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* bytes cache_body = 2;
* @return This builder for chaining.
*/
public Builder clearCacheBody() {
bitField0_ = (bitField0_ & ~0x00000002);
cacheBody_ = getDefaultInstance().getCacheBody();
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
* string message = 3;
* @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 = 3;
* @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 = 3;
* @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_ |= 0x00000004;
onChanged();
return this;
}
/**
* string message = 3;
* @return This builder for chaining.
*/
public Builder clearMessage() {
message_ = getDefaultInstance().getMessage();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* string message = 3;
* @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_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:cache_client._GetResponse)
}
// @@protoc_insertion_point(class_scope:cache_client._GetResponse)
private static final grpc.cache_client._GetResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.cache_client._GetResponse();
}
public static grpc.cache_client._GetResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_GetResponse>
PARSER = new com.google.protobuf.AbstractParser<_GetResponse>() {
@java.lang.Override
public _GetResponse 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<_GetResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_GetResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.cache_client._GetResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}