All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openfeed.MarketSnapshotResponse Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: openfeed.proto
// Protobuf Java Version: 4.28.3

package org.openfeed;

/**
 * 
 * Used by market state to return snapshot.
 * 
* * Protobuf type {@code org.openfeed.MarketSnapshotResponse} */ public final class MarketSnapshotResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:org.openfeed.MarketSnapshotResponse) MarketSnapshotResponseOrBuilder { 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= */ "", MarketSnapshotResponse.class.getName()); } // Use MarketSnapshotResponse.newBuilder() to construct. private MarketSnapshotResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MarketSnapshotResponse() { result_ = 0; message_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.openfeed.Openfeed.internal_static_org_openfeed_MarketSnapshotResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.openfeed.Openfeed.internal_static_org_openfeed_MarketSnapshotResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.openfeed.MarketSnapshotResponse.class, org.openfeed.MarketSnapshotResponse.Builder.class); } private int bitField0_; public static final int RESULT_FIELD_NUMBER = 1; private int result_ = 0; /** * .org.openfeed.SnapshotRequestResult result = 1; * @return The enum numeric value on the wire for result. */ @java.lang.Override public int getResultValue() { return result_; } /** * .org.openfeed.SnapshotRequestResult result = 1; * @return The result. */ @java.lang.Override public org.openfeed.SnapshotRequestResult getResult() { org.openfeed.SnapshotRequestResult result = org.openfeed.SnapshotRequestResult.forNumber(result_); return result == null ? org.openfeed.SnapshotRequestResult.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 MARKETSNAPSHOT_FIELD_NUMBER = 3; private org.openfeed.MarketSnapshot marketSnapshot_; /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; * @return Whether the marketSnapshot field is set. */ @java.lang.Override public boolean hasMarketSnapshot() { return ((bitField0_ & 0x00000001) != 0); } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; * @return The marketSnapshot. */ @java.lang.Override public org.openfeed.MarketSnapshot getMarketSnapshot() { return marketSnapshot_ == null ? org.openfeed.MarketSnapshot.getDefaultInstance() : marketSnapshot_; } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ @java.lang.Override public org.openfeed.MarketSnapshotOrBuilder getMarketSnapshotOrBuilder() { return marketSnapshot_ == null ? org.openfeed.MarketSnapshot.getDefaultInstance() : marketSnapshot_; } 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.SnapshotRequestResult.SNAPSHOT_REQUEST_UNKNOWN_RESULT.getNumber()) { output.writeEnum(1, result_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getMarketSnapshot()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (result_ != org.openfeed.SnapshotRequestResult.SNAPSHOT_REQUEST_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 (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getMarketSnapshot()); } 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.MarketSnapshotResponse)) { return super.equals(obj); } org.openfeed.MarketSnapshotResponse other = (org.openfeed.MarketSnapshotResponse) obj; if (result_ != other.result_) return false; if (!getMessage() .equals(other.getMessage())) return false; if (hasMarketSnapshot() != other.hasMarketSnapshot()) return false; if (hasMarketSnapshot()) { if (!getMarketSnapshot() .equals(other.getMarketSnapshot())) 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(); if (hasMarketSnapshot()) { hash = (37 * hash) + MARKETSNAPSHOT_FIELD_NUMBER; hash = (53 * hash) + getMarketSnapshot().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.openfeed.MarketSnapshotResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openfeed.MarketSnapshotResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openfeed.MarketSnapshotResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openfeed.MarketSnapshotResponse 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.MarketSnapshotResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.openfeed.MarketSnapshotResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.openfeed.MarketSnapshotResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.openfeed.MarketSnapshotResponse 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.MarketSnapshotResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.openfeed.MarketSnapshotResponse 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.MarketSnapshotResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.openfeed.MarketSnapshotResponse 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.MarketSnapshotResponse 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; } /** *
   * Used by market state to return snapshot.
   * 
* * Protobuf type {@code org.openfeed.MarketSnapshotResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:org.openfeed.MarketSnapshotResponse) org.openfeed.MarketSnapshotResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.openfeed.Openfeed.internal_static_org_openfeed_MarketSnapshotResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.openfeed.Openfeed.internal_static_org_openfeed_MarketSnapshotResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.openfeed.MarketSnapshotResponse.class, org.openfeed.MarketSnapshotResponse.Builder.class); } // Construct using org.openfeed.MarketSnapshotResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getMarketSnapshotFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; result_ = 0; message_ = ""; marketSnapshot_ = null; if (marketSnapshotBuilder_ != null) { marketSnapshotBuilder_.dispose(); marketSnapshotBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.openfeed.Openfeed.internal_static_org_openfeed_MarketSnapshotResponse_descriptor; } @java.lang.Override public org.openfeed.MarketSnapshotResponse getDefaultInstanceForType() { return org.openfeed.MarketSnapshotResponse.getDefaultInstance(); } @java.lang.Override public org.openfeed.MarketSnapshotResponse build() { org.openfeed.MarketSnapshotResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.openfeed.MarketSnapshotResponse buildPartial() { org.openfeed.MarketSnapshotResponse result = new org.openfeed.MarketSnapshotResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.openfeed.MarketSnapshotResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.result_ = result_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.message_ = message_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.marketSnapshot_ = marketSnapshotBuilder_ == null ? marketSnapshot_ : marketSnapshotBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.openfeed.MarketSnapshotResponse) { return mergeFrom((org.openfeed.MarketSnapshotResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.openfeed.MarketSnapshotResponse other) { if (other == org.openfeed.MarketSnapshotResponse.getDefaultInstance()) return this; if (other.result_ != 0) { setResultValue(other.getResultValue()); } if (!other.getMessage().isEmpty()) { message_ = other.message_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasMarketSnapshot()) { mergeMarketSnapshot(other.getMarketSnapshot()); } 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 26: { input.readMessage( getMarketSnapshotFieldBuilder().getBuilder(), extensionRegistry); 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; /** * .org.openfeed.SnapshotRequestResult result = 1; * @return The enum numeric value on the wire for result. */ @java.lang.Override public int getResultValue() { return result_; } /** * .org.openfeed.SnapshotRequestResult 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.SnapshotRequestResult result = 1; * @return The result. */ @java.lang.Override public org.openfeed.SnapshotRequestResult getResult() { org.openfeed.SnapshotRequestResult result = org.openfeed.SnapshotRequestResult.forNumber(result_); return result == null ? org.openfeed.SnapshotRequestResult.UNRECOGNIZED : result; } /** * .org.openfeed.SnapshotRequestResult result = 1; * @param value The result to set. * @return This builder for chaining. */ public Builder setResult(org.openfeed.SnapshotRequestResult value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; result_ = value.getNumber(); onChanged(); return this; } /** * .org.openfeed.SnapshotRequestResult 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 org.openfeed.MarketSnapshot marketSnapshot_; private com.google.protobuf.SingleFieldBuilder< org.openfeed.MarketSnapshot, org.openfeed.MarketSnapshot.Builder, org.openfeed.MarketSnapshotOrBuilder> marketSnapshotBuilder_; /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; * @return Whether the marketSnapshot field is set. */ public boolean hasMarketSnapshot() { return ((bitField0_ & 0x00000004) != 0); } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; * @return The marketSnapshot. */ public org.openfeed.MarketSnapshot getMarketSnapshot() { if (marketSnapshotBuilder_ == null) { return marketSnapshot_ == null ? org.openfeed.MarketSnapshot.getDefaultInstance() : marketSnapshot_; } else { return marketSnapshotBuilder_.getMessage(); } } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ public Builder setMarketSnapshot(org.openfeed.MarketSnapshot value) { if (marketSnapshotBuilder_ == null) { if (value == null) { throw new NullPointerException(); } marketSnapshot_ = value; } else { marketSnapshotBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ public Builder setMarketSnapshot( org.openfeed.MarketSnapshot.Builder builderForValue) { if (marketSnapshotBuilder_ == null) { marketSnapshot_ = builderForValue.build(); } else { marketSnapshotBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ public Builder mergeMarketSnapshot(org.openfeed.MarketSnapshot value) { if (marketSnapshotBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && marketSnapshot_ != null && marketSnapshot_ != org.openfeed.MarketSnapshot.getDefaultInstance()) { getMarketSnapshotBuilder().mergeFrom(value); } else { marketSnapshot_ = value; } } else { marketSnapshotBuilder_.mergeFrom(value); } if (marketSnapshot_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ public Builder clearMarketSnapshot() { bitField0_ = (bitField0_ & ~0x00000004); marketSnapshot_ = null; if (marketSnapshotBuilder_ != null) { marketSnapshotBuilder_.dispose(); marketSnapshotBuilder_ = null; } onChanged(); return this; } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ public org.openfeed.MarketSnapshot.Builder getMarketSnapshotBuilder() { bitField0_ |= 0x00000004; onChanged(); return getMarketSnapshotFieldBuilder().getBuilder(); } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ public org.openfeed.MarketSnapshotOrBuilder getMarketSnapshotOrBuilder() { if (marketSnapshotBuilder_ != null) { return marketSnapshotBuilder_.getMessageOrBuilder(); } else { return marketSnapshot_ == null ? org.openfeed.MarketSnapshot.getDefaultInstance() : marketSnapshot_; } } /** * .org.openfeed.MarketSnapshot marketSnapshot = 3; */ private com.google.protobuf.SingleFieldBuilder< org.openfeed.MarketSnapshot, org.openfeed.MarketSnapshot.Builder, org.openfeed.MarketSnapshotOrBuilder> getMarketSnapshotFieldBuilder() { if (marketSnapshotBuilder_ == null) { marketSnapshotBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.openfeed.MarketSnapshot, org.openfeed.MarketSnapshot.Builder, org.openfeed.MarketSnapshotOrBuilder>( getMarketSnapshot(), getParentForChildren(), isClean()); marketSnapshot_ = null; } return marketSnapshotBuilder_; } // @@protoc_insertion_point(builder_scope:org.openfeed.MarketSnapshotResponse) } // @@protoc_insertion_point(class_scope:org.openfeed.MarketSnapshotResponse) private static final org.openfeed.MarketSnapshotResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.openfeed.MarketSnapshotResponse(); } public static org.openfeed.MarketSnapshotResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MarketSnapshotResponse 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.MarketSnapshotResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy