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

org.finos.tracdap.api.DataReadResponse Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tracdap/api/data.proto

// Protobuf Java Version: 3.25.3
package org.finos.tracdap.api;

/**
 * 
 **
 * Response to a request to read a dataset stored in the TRAC platform.
 *
 * @see TracDataApi.readDataset
 * 
* * Protobuf type {@code tracdap.api.DataReadResponse} */ public final class DataReadResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tracdap.api.DataReadResponse) DataReadResponseOrBuilder { private static final long serialVersionUID = 0L; // Use DataReadResponse.newBuilder() to construct. private DataReadResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DataReadResponse() { content_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new DataReadResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DataReadResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DataReadResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.finos.tracdap.api.DataReadResponse.class, org.finos.tracdap.api.DataReadResponse.Builder.class); } private int bitField0_; public static final int SCHEMA_FIELD_NUMBER = 1; private org.finos.tracdap.metadata.SchemaDefinition schema_; /** *
   **
   * Schema of the dataset being returned.
   *
   * The schema is provided in the first message of the response stream.
   * TRAC will always provide a full schema, regardless of whether the
   * dataset is using am external schema or an embedded one.
   * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; * @return Whether the schema field is set. */ @java.lang.Override public boolean hasSchema() { return ((bitField0_ & 0x00000001) != 0); } /** *
   **
   * Schema of the dataset being returned.
   *
   * The schema is provided in the first message of the response stream.
   * TRAC will always provide a full schema, regardless of whether the
   * dataset is using am external schema or an embedded one.
   * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; * @return The schema. */ @java.lang.Override public org.finos.tracdap.metadata.SchemaDefinition getSchema() { return schema_ == null ? org.finos.tracdap.metadata.SchemaDefinition.getDefaultInstance() : schema_; } /** *
   **
   * Schema of the dataset being returned.
   *
   * The schema is provided in the first message of the response stream.
   * TRAC will always provide a full schema, regardless of whether the
   * dataset is using am external schema or an embedded one.
   * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ @java.lang.Override public org.finos.tracdap.metadata.SchemaDefinitionOrBuilder getSchemaOrBuilder() { return schema_ == null ? org.finos.tracdap.metadata.SchemaDefinition.getDefaultInstance() : schema_; } public static final int CONTENT_FIELD_NUMBER = 1000; private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** *
   **
   * Content of the dataset, encoded in the requested format.
   *
   * The first message in the response stream will always contain an empty
   * content buffer. Subsequent messages will provided the content of the
   * dataset as a series of chunks.
   * 
* * bytes content = 1000; * @return The content. */ @java.lang.Override public com.google.protobuf.ByteString getContent() { return content_; } 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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getSchema()); } if (!content_.isEmpty()) { output.writeBytes(1000, content_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getSchema()); } if (!content_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1000, content_); } 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.finos.tracdap.api.DataReadResponse)) { return super.equals(obj); } org.finos.tracdap.api.DataReadResponse other = (org.finos.tracdap.api.DataReadResponse) obj; if (hasSchema() != other.hasSchema()) return false; if (hasSchema()) { if (!getSchema() .equals(other.getSchema())) return false; } if (!getContent() .equals(other.getContent())) 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 (hasSchema()) { hash = (37 * hash) + SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getSchema().hashCode(); } hash = (37 * hash) + CONTENT_FIELD_NUMBER; hash = (53 * hash) + getContent().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.finos.tracdap.api.DataReadResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.DataReadResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.finos.tracdap.api.DataReadResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.DataReadResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.finos.tracdap.api.DataReadResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.DataReadResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.finos.tracdap.api.DataReadResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.finos.tracdap.api.DataReadResponse 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 org.finos.tracdap.api.DataReadResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.finos.tracdap.api.DataReadResponse 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 org.finos.tracdap.api.DataReadResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.finos.tracdap.api.DataReadResponse 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(org.finos.tracdap.api.DataReadResponse 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; } /** *
   **
   * Response to a request to read a dataset stored in the TRAC platform.
   *
   * @see TracDataApi.readDataset
   * 
* * Protobuf type {@code tracdap.api.DataReadResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tracdap.api.DataReadResponse) org.finos.tracdap.api.DataReadResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DataReadResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DataReadResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.finos.tracdap.api.DataReadResponse.class, org.finos.tracdap.api.DataReadResponse.Builder.class); } // Construct using org.finos.tracdap.api.DataReadResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getSchemaFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; schema_ = null; if (schemaBuilder_ != null) { schemaBuilder_.dispose(); schemaBuilder_ = null; } content_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DataReadResponse_descriptor; } @java.lang.Override public org.finos.tracdap.api.DataReadResponse getDefaultInstanceForType() { return org.finos.tracdap.api.DataReadResponse.getDefaultInstance(); } @java.lang.Override public org.finos.tracdap.api.DataReadResponse build() { org.finos.tracdap.api.DataReadResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.finos.tracdap.api.DataReadResponse buildPartial() { org.finos.tracdap.api.DataReadResponse result = new org.finos.tracdap.api.DataReadResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.finos.tracdap.api.DataReadResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.content_ = content_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.finos.tracdap.api.DataReadResponse) { return mergeFrom((org.finos.tracdap.api.DataReadResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.finos.tracdap.api.DataReadResponse other) { if (other == org.finos.tracdap.api.DataReadResponse.getDefaultInstance()) return this; if (other.hasSchema()) { mergeSchema(other.getSchema()); } if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { setContent(other.getContent()); } 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( getSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 8002: { content_ = input.readBytes(); bitField0_ |= 0x00000002; break; } // case 8002 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 org.finos.tracdap.metadata.SchemaDefinition schema_; private com.google.protobuf.SingleFieldBuilderV3< org.finos.tracdap.metadata.SchemaDefinition, org.finos.tracdap.metadata.SchemaDefinition.Builder, org.finos.tracdap.metadata.SchemaDefinitionOrBuilder> schemaBuilder_; /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; * @return Whether the schema field is set. */ public boolean hasSchema() { return ((bitField0_ & 0x00000001) != 0); } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; * @return The schema. */ public org.finos.tracdap.metadata.SchemaDefinition getSchema() { if (schemaBuilder_ == null) { return schema_ == null ? org.finos.tracdap.metadata.SchemaDefinition.getDefaultInstance() : schema_; } else { return schemaBuilder_.getMessage(); } } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ public Builder setSchema(org.finos.tracdap.metadata.SchemaDefinition value) { if (schemaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } schema_ = value; } else { schemaBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ public Builder setSchema( org.finos.tracdap.metadata.SchemaDefinition.Builder builderForValue) { if (schemaBuilder_ == null) { schema_ = builderForValue.build(); } else { schemaBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ public Builder mergeSchema(org.finos.tracdap.metadata.SchemaDefinition value) { if (schemaBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && schema_ != null && schema_ != org.finos.tracdap.metadata.SchemaDefinition.getDefaultInstance()) { getSchemaBuilder().mergeFrom(value); } else { schema_ = value; } } else { schemaBuilder_.mergeFrom(value); } if (schema_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ public Builder clearSchema() { bitField0_ = (bitField0_ & ~0x00000001); schema_ = null; if (schemaBuilder_ != null) { schemaBuilder_.dispose(); schemaBuilder_ = null; } onChanged(); return this; } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ public org.finos.tracdap.metadata.SchemaDefinition.Builder getSchemaBuilder() { bitField0_ |= 0x00000001; onChanged(); return getSchemaFieldBuilder().getBuilder(); } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ public org.finos.tracdap.metadata.SchemaDefinitionOrBuilder getSchemaOrBuilder() { if (schemaBuilder_ != null) { return schemaBuilder_.getMessageOrBuilder(); } else { return schema_ == null ? org.finos.tracdap.metadata.SchemaDefinition.getDefaultInstance() : schema_; } } /** *
     **
     * Schema of the dataset being returned.
     *
     * The schema is provided in the first message of the response stream.
     * TRAC will always provide a full schema, regardless of whether the
     * dataset is using am external schema or an embedded one.
     * 
* * optional .tracdap.metadata.SchemaDefinition schema = 1; */ private com.google.protobuf.SingleFieldBuilderV3< org.finos.tracdap.metadata.SchemaDefinition, org.finos.tracdap.metadata.SchemaDefinition.Builder, org.finos.tracdap.metadata.SchemaDefinitionOrBuilder> getSchemaFieldBuilder() { if (schemaBuilder_ == null) { schemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.finos.tracdap.metadata.SchemaDefinition, org.finos.tracdap.metadata.SchemaDefinition.Builder, org.finos.tracdap.metadata.SchemaDefinitionOrBuilder>( getSchema(), getParentForChildren(), isClean()); schema_ = null; } return schemaBuilder_; } private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** *
     **
     * Content of the dataset, encoded in the requested format.
     *
     * The first message in the response stream will always contain an empty
     * content buffer. Subsequent messages will provided the content of the
     * dataset as a series of chunks.
     * 
* * bytes content = 1000; * @return The content. */ @java.lang.Override public com.google.protobuf.ByteString getContent() { return content_; } /** *
     **
     * Content of the dataset, encoded in the requested format.
     *
     * The first message in the response stream will always contain an empty
     * content buffer. Subsequent messages will provided the content of the
     * dataset as a series of chunks.
     * 
* * bytes content = 1000; * @param value The content to set. * @return This builder for chaining. */ public Builder setContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } content_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     **
     * Content of the dataset, encoded in the requested format.
     *
     * The first message in the response stream will always contain an empty
     * content buffer. Subsequent messages will provided the content of the
     * dataset as a series of chunks.
     * 
* * bytes content = 1000; * @return This builder for chaining. */ public Builder clearContent() { bitField0_ = (bitField0_ & ~0x00000002); content_ = getDefaultInstance().getContent(); 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:tracdap.api.DataReadResponse) } // @@protoc_insertion_point(class_scope:tracdap.api.DataReadResponse) private static final org.finos.tracdap.api.DataReadResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.finos.tracdap.api.DataReadResponse(); } public static org.finos.tracdap.api.DataReadResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DataReadResponse 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.finos.tracdap.api.DataReadResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy