grpc.store._StoreGetResponse 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: store.proto
package grpc.store;
/**
*
* This response is for when a get request concludes successfully.
* These are some of the Errors and their corresponding GRPC status codes.
* 1. Invalid argument was provided, value is missing -> grpc code = INVALID_ARGUMENT. Metadata: "err" -> "momento_general_err"
* 2. Item does not exist. grpc code = NOT_FOUND. Metadata: "err" -> "item_not_found"
* 3. Store not found. grpc code = NOT_FOUND. Metadata: "err" -> "store_not_found"
*
*
* Protobuf type {@code store._StoreGetResponse}
*/
public final class _StoreGetResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:store._StoreGetResponse)
_StoreGetResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use _StoreGetResponse.newBuilder() to construct.
private _StoreGetResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _StoreGetResponse() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _StoreGetResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.store.StoreOuterClass.internal_static_store__StoreGetResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.store.StoreOuterClass.internal_static_store__StoreGetResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.store._StoreGetResponse.class, grpc.store._StoreGetResponse.Builder.class);
}
public static final int VALUE_FIELD_NUMBER = 1;
private grpc.store._StoreValue value_;
/**
* .store._StoreValue value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return value_ != null;
}
/**
* .store._StoreValue value = 1;
* @return The value.
*/
@java.lang.Override
public grpc.store._StoreValue getValue() {
return value_ == null ? grpc.store._StoreValue.getDefaultInstance() : value_;
}
/**
* .store._StoreValue value = 1;
*/
@java.lang.Override
public grpc.store._StoreValueOrBuilder getValueOrBuilder() {
return value_ == null ? grpc.store._StoreValue.getDefaultInstance() : value_;
}
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 (value_ != null) {
output.writeMessage(1, getValue());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (value_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getValue());
}
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.store._StoreGetResponse)) {
return super.equals(obj);
}
grpc.store._StoreGetResponse other = (grpc.store._StoreGetResponse) obj;
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (!getValue()
.equals(other.getValue())) 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();
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.store._StoreGetResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.store._StoreGetResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.store._StoreGetResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.store._StoreGetResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.store._StoreGetResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.store._StoreGetResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.store._StoreGetResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.store._StoreGetResponse 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.store._StoreGetResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.store._StoreGetResponse 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.store._StoreGetResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.store._StoreGetResponse 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.store._StoreGetResponse 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;
}
/**
*
* This response is for when a get request concludes successfully.
* These are some of the Errors and their corresponding GRPC status codes.
* 1. Invalid argument was provided, value is missing -> grpc code = INVALID_ARGUMENT. Metadata: "err" -> "momento_general_err"
* 2. Item does not exist. grpc code = NOT_FOUND. Metadata: "err" -> "item_not_found"
* 3. Store not found. grpc code = NOT_FOUND. Metadata: "err" -> "store_not_found"
*
*
* Protobuf type {@code store._StoreGetResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:store._StoreGetResponse)
grpc.store._StoreGetResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.store.StoreOuterClass.internal_static_store__StoreGetResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.store.StoreOuterClass.internal_static_store__StoreGetResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.store._StoreGetResponse.class, grpc.store._StoreGetResponse.Builder.class);
}
// Construct using grpc.store._StoreGetResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
valueBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.store.StoreOuterClass.internal_static_store__StoreGetResponse_descriptor;
}
@java.lang.Override
public grpc.store._StoreGetResponse getDefaultInstanceForType() {
return grpc.store._StoreGetResponse.getDefaultInstance();
}
@java.lang.Override
public grpc.store._StoreGetResponse build() {
grpc.store._StoreGetResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.store._StoreGetResponse buildPartial() {
grpc.store._StoreGetResponse result = new grpc.store._StoreGetResponse(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.store._StoreGetResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = valueBuilder_ == null
? value_
: valueBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.store._StoreGetResponse) {
return mergeFrom((grpc.store._StoreGetResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.store._StoreGetResponse other) {
if (other == grpc.store._StoreGetResponse.getDefaultInstance()) return this;
if (other.hasValue()) {
mergeValue(other.getValue());
}
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 10: {
input.readMessage(
getValueFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
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 grpc.store._StoreValue value_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.store._StoreValue, grpc.store._StoreValue.Builder, grpc.store._StoreValueOrBuilder> valueBuilder_;
/**
* .store._StoreValue value = 1;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .store._StoreValue value = 1;
* @return The value.
*/
public grpc.store._StoreValue getValue() {
if (valueBuilder_ == null) {
return value_ == null ? grpc.store._StoreValue.getDefaultInstance() : value_;
} else {
return valueBuilder_.getMessage();
}
}
/**
* .store._StoreValue value = 1;
*/
public Builder setValue(grpc.store._StoreValue value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
} else {
valueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .store._StoreValue value = 1;
*/
public Builder setValue(
grpc.store._StoreValue.Builder builderForValue) {
if (valueBuilder_ == null) {
value_ = builderForValue.build();
} else {
valueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .store._StoreValue value = 1;
*/
public Builder mergeValue(grpc.store._StoreValue value) {
if (valueBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
value_ != null &&
value_ != grpc.store._StoreValue.getDefaultInstance()) {
getValueBuilder().mergeFrom(value);
} else {
value_ = value;
}
} else {
valueBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .store._StoreValue value = 1;
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = null;
if (valueBuilder_ != null) {
valueBuilder_.dispose();
valueBuilder_ = null;
}
onChanged();
return this;
}
/**
* .store._StoreValue value = 1;
*/
public grpc.store._StoreValue.Builder getValueBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getValueFieldBuilder().getBuilder();
}
/**
* .store._StoreValue value = 1;
*/
public grpc.store._StoreValueOrBuilder getValueOrBuilder() {
if (valueBuilder_ != null) {
return valueBuilder_.getMessageOrBuilder();
} else {
return value_ == null ?
grpc.store._StoreValue.getDefaultInstance() : value_;
}
}
/**
* .store._StoreValue value = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.store._StoreValue, grpc.store._StoreValue.Builder, grpc.store._StoreValueOrBuilder>
getValueFieldBuilder() {
if (valueBuilder_ == null) {
valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.store._StoreValue, grpc.store._StoreValue.Builder, grpc.store._StoreValueOrBuilder>(
getValue(),
getParentForChildren(),
isClean());
value_ = null;
}
return valueBuilder_;
}
@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:store._StoreGetResponse)
}
// @@protoc_insertion_point(class_scope:store._StoreGetResponse)
private static final grpc.store._StoreGetResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.store._StoreGetResponse();
}
public static grpc.store._StoreGetResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_StoreGetResponse>
PARSER = new com.google.protobuf.AbstractParser<_StoreGetResponse>() {
@java.lang.Override
public _StoreGetResponse 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<_StoreGetResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_StoreGetResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.store._StoreGetResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}