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

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

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: tracdap/api/data.proto
// Protobuf Java Version: 4.28.2

package org.finos.tracdap.api;

/**
 * 
 * *
 * Response object for an HTTP download
 * 
* * Protobuf type {@code tracdap.api.DownloadResponse} */ public final class DownloadResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:tracdap.api.DownloadResponse) DownloadResponseOrBuilder { 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= */ "", DownloadResponse.class.getName()); } // Use DownloadResponse.newBuilder() to construct. private DownloadResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DownloadResponse() { contentType_ = ""; content_ = com.google.protobuf.ByteString.EMPTY; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DownloadResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DownloadResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.finos.tracdap.api.DownloadResponse.class, org.finos.tracdap.api.DownloadResponse.Builder.class); } private int bitField0_; public static final int CONTENTTYPE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object contentType_ = ""; /** * optional string contentType = 1; * @return Whether the contentType field is set. */ @java.lang.Override public boolean hasContentType() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string contentType = 1; * @return The contentType. */ @java.lang.Override public java.lang.String getContentType() { java.lang.Object ref = contentType_; 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(); contentType_ = s; return s; } } /** * optional string contentType = 1; * @return The bytes for contentType. */ @java.lang.Override public com.google.protobuf.ByteString getContentTypeBytes() { java.lang.Object ref = contentType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); contentType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTENTLENGTH_FIELD_NUMBER = 2; private long contentLength_ = 0L; /** * optional uint64 contentLength = 2; * @return Whether the contentLength field is set. */ @java.lang.Override public boolean hasContentLength() { return ((bitField0_ & 0x00000002) != 0); } /** * optional uint64 contentLength = 2; * @return The contentLength. */ @java.lang.Override public long getContentLength() { return contentLength_; } public static final int CONTENT_FIELD_NUMBER = 1000; private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * 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)) { com.google.protobuf.GeneratedMessage.writeString(output, 1, contentType_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt64(2, contentLength_); } 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.GeneratedMessage.computeStringSize(1, contentType_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, contentLength_); } 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.DownloadResponse)) { return super.equals(obj); } org.finos.tracdap.api.DownloadResponse other = (org.finos.tracdap.api.DownloadResponse) obj; if (hasContentType() != other.hasContentType()) return false; if (hasContentType()) { if (!getContentType() .equals(other.getContentType())) return false; } if (hasContentLength() != other.hasContentLength()) return false; if (hasContentLength()) { if (getContentLength() != other.getContentLength()) 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 (hasContentType()) { hash = (37 * hash) + CONTENTTYPE_FIELD_NUMBER; hash = (53 * hash) + getContentType().hashCode(); } if (hasContentLength()) { hash = (37 * hash) + CONTENTLENGTH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getContentLength()); } 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.DownloadResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.DownloadResponse 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.DownloadResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.DownloadResponse 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.DownloadResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.finos.tracdap.api.DownloadResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.finos.tracdap.api.DownloadResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.finos.tracdap.api.DownloadResponse 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.finos.tracdap.api.DownloadResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.finos.tracdap.api.DownloadResponse 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.finos.tracdap.api.DownloadResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.finos.tracdap.api.DownloadResponse 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.finos.tracdap.api.DownloadResponse 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; } /** *
   * *
   * Response object for an HTTP download
   * 
* * Protobuf type {@code tracdap.api.DownloadResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:tracdap.api.DownloadResponse) org.finos.tracdap.api.DownloadResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DownloadResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.finos.tracdap.api.Data.internal_static_tracdap_api_DownloadResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( org.finos.tracdap.api.DownloadResponse.class, org.finos.tracdap.api.DownloadResponse.Builder.class); } // Construct using org.finos.tracdap.api.DownloadResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; contentType_ = ""; contentLength_ = 0L; 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_DownloadResponse_descriptor; } @java.lang.Override public org.finos.tracdap.api.DownloadResponse getDefaultInstanceForType() { return org.finos.tracdap.api.DownloadResponse.getDefaultInstance(); } @java.lang.Override public org.finos.tracdap.api.DownloadResponse build() { org.finos.tracdap.api.DownloadResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.finos.tracdap.api.DownloadResponse buildPartial() { org.finos.tracdap.api.DownloadResponse result = new org.finos.tracdap.api.DownloadResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.finos.tracdap.api.DownloadResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.contentType_ = contentType_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.contentLength_ = contentLength_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.content_ = content_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.finos.tracdap.api.DownloadResponse) { return mergeFrom((org.finos.tracdap.api.DownloadResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.finos.tracdap.api.DownloadResponse other) { if (other == org.finos.tracdap.api.DownloadResponse.getDefaultInstance()) return this; if (other.hasContentType()) { contentType_ = other.contentType_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasContentLength()) { setContentLength(other.getContentLength()); } 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: { contentType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { contentLength_ = input.readUInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 8002: { content_ = input.readBytes(); bitField0_ |= 0x00000004; 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 java.lang.Object contentType_ = ""; /** * optional string contentType = 1; * @return Whether the contentType field is set. */ public boolean hasContentType() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string contentType = 1; * @return The contentType. */ public java.lang.String getContentType() { java.lang.Object ref = contentType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); contentType_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string contentType = 1; * @return The bytes for contentType. */ public com.google.protobuf.ByteString getContentTypeBytes() { java.lang.Object ref = contentType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); contentType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string contentType = 1; * @param value The contentType to set. * @return This builder for chaining. */ public Builder setContentType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } contentType_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * optional string contentType = 1; * @return This builder for chaining. */ public Builder clearContentType() { contentType_ = getDefaultInstance().getContentType(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * optional string contentType = 1; * @param value The bytes for contentType to set. * @return This builder for chaining. */ public Builder setContentTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); contentType_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private long contentLength_ ; /** * optional uint64 contentLength = 2; * @return Whether the contentLength field is set. */ @java.lang.Override public boolean hasContentLength() { return ((bitField0_ & 0x00000002) != 0); } /** * optional uint64 contentLength = 2; * @return The contentLength. */ @java.lang.Override public long getContentLength() { return contentLength_; } /** * optional uint64 contentLength = 2; * @param value The contentLength to set. * @return This builder for chaining. */ public Builder setContentLength(long value) { contentLength_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * optional uint64 contentLength = 2; * @return This builder for chaining. */ public Builder clearContentLength() { bitField0_ = (bitField0_ & ~0x00000002); contentLength_ = 0L; onChanged(); return this; } private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * bytes content = 1000; * @return The content. */ @java.lang.Override public com.google.protobuf.ByteString getContent() { return content_; } /** * 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_ |= 0x00000004; onChanged(); return this; } /** * bytes content = 1000; * @return This builder for chaining. */ public Builder clearContent() { bitField0_ = (bitField0_ & ~0x00000004); content_ = getDefaultInstance().getContent(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:tracdap.api.DownloadResponse) } // @@protoc_insertion_point(class_scope:tracdap.api.DownloadResponse) private static final org.finos.tracdap.api.DownloadResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.finos.tracdap.api.DownloadResponse(); } public static org.finos.tracdap.api.DownloadResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DownloadResponse 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.DownloadResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy