From f70a16127a62af23df297a542bd282e023714208 Mon Sep 17 00:00:00 2001 From: AlibabaRazboinik Date: Tue, 12 Nov 2024 16:54:47 +0500 Subject: [PATCH] model added --- .../Diadoc/Api/Proto/FileToUploadProtos.java | 615 ++++++++++++++++++ 1 file changed, 615 insertions(+) create mode 100644 src/main/java/Diadoc/Api/Proto/FileToUploadProtos.java diff --git a/src/main/java/Diadoc/Api/Proto/FileToUploadProtos.java b/src/main/java/Diadoc/Api/Proto/FileToUploadProtos.java new file mode 100644 index 00000000..d74bd0c8 --- /dev/null +++ b/src/main/java/Diadoc/Api/Proto/FileToUploadProtos.java @@ -0,0 +1,615 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: FileToUpload.proto + +package Diadoc.Api.Proto; + +public final class FileToUploadProtos { + private FileToUploadProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface FileToUploadOrBuilder extends + // @@protoc_insertion_point(interface_extends:Diadoc.Api.Proto.FileToUpload) + com.google.protobuf.MessageOrBuilder { + + /** + * required bytes Content = 1; + */ + boolean hasContent(); + /** + * required bytes Content = 1; + */ + com.google.protobuf.ByteString getContent(); + + /** + * optional string FileExtension = 2; + */ + boolean hasFileExtension(); + /** + * optional string FileExtension = 2; + */ + java.lang.String getFileExtension(); + /** + * optional string FileExtension = 2; + */ + com.google.protobuf.ByteString + getFileExtensionBytes(); + } + /** + * Protobuf type {@code Diadoc.Api.Proto.FileToUpload} + */ + public static final class FileToUpload extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Diadoc.Api.Proto.FileToUpload) + FileToUploadOrBuilder { + // Use FileToUpload.newBuilder() to construct. + private FileToUpload(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private FileToUpload(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final FileToUpload defaultInstance; + public static FileToUpload getDefaultInstance() { + return defaultInstance; + } + + public FileToUpload getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FileToUpload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + content_ = input.readBytes(); + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + fileExtension_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Diadoc.Api.Proto.FileToUploadProtos.internal_static_Diadoc_Api_Proto_FileToUpload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return Diadoc.Api.Proto.FileToUploadProtos.internal_static_Diadoc_Api_Proto_FileToUpload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Diadoc.Api.Proto.FileToUploadProtos.FileToUpload.class, Diadoc.Api.Proto.FileToUploadProtos.FileToUpload.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public FileToUpload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FileToUpload(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_; + /** + * required bytes Content = 1; + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bytes Content = 1; + */ + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int FILEEXTENSION_FIELD_NUMBER = 2; + private java.lang.Object fileExtension_; + /** + * optional string FileExtension = 2; + */ + public boolean hasFileExtension() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string FileExtension = 2; + */ + public java.lang.String getFileExtension() { + java.lang.Object ref = fileExtension_; + 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(); + if (bs.isValidUtf8()) { + fileExtension_ = s; + } + return s; + } + } + /** + * optional string FileExtension = 2; + */ + public com.google.protobuf.ByteString + getFileExtensionBytes() { + java.lang.Object ref = fileExtension_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileExtension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + content_ = com.google.protobuf.ByteString.EMPTY; + fileExtension_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasContent()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, content_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getFileExtensionBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, content_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getFileExtensionBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(Diadoc.Api.Proto.FileToUploadProtos.FileToUpload prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Diadoc.Api.Proto.FileToUpload} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Diadoc.Api.Proto.FileToUpload) + Diadoc.Api.Proto.FileToUploadProtos.FileToUploadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Diadoc.Api.Proto.FileToUploadProtos.internal_static_Diadoc_Api_Proto_FileToUpload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return Diadoc.Api.Proto.FileToUploadProtos.internal_static_Diadoc_Api_Proto_FileToUpload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Diadoc.Api.Proto.FileToUploadProtos.FileToUpload.class, Diadoc.Api.Proto.FileToUploadProtos.FileToUpload.Builder.class); + } + + // Construct using Diadoc.Api.Proto.FileToUploadProtos.FileToUpload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + content_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + fileExtension_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Diadoc.Api.Proto.FileToUploadProtos.internal_static_Diadoc_Api_Proto_FileToUpload_descriptor; + } + + public Diadoc.Api.Proto.FileToUploadProtos.FileToUpload getDefaultInstanceForType() { + return Diadoc.Api.Proto.FileToUploadProtos.FileToUpload.getDefaultInstance(); + } + + public Diadoc.Api.Proto.FileToUploadProtos.FileToUpload build() { + Diadoc.Api.Proto.FileToUploadProtos.FileToUpload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public Diadoc.Api.Proto.FileToUploadProtos.FileToUpload buildPartial() { + Diadoc.Api.Proto.FileToUploadProtos.FileToUpload result = new Diadoc.Api.Proto.FileToUploadProtos.FileToUpload(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.content_ = content_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.fileExtension_ = fileExtension_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Diadoc.Api.Proto.FileToUploadProtos.FileToUpload) { + return mergeFrom((Diadoc.Api.Proto.FileToUploadProtos.FileToUpload)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Diadoc.Api.Proto.FileToUploadProtos.FileToUpload other) { + if (other == Diadoc.Api.Proto.FileToUploadProtos.FileToUpload.getDefaultInstance()) return this; + if (other.hasContent()) { + setContent(other.getContent()); + } + if (other.hasFileExtension()) { + bitField0_ |= 0x00000002; + fileExtension_ = other.fileExtension_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasContent()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Diadoc.Api.Proto.FileToUploadProtos.FileToUpload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Diadoc.Api.Proto.FileToUploadProtos.FileToUpload) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + * required bytes Content = 1; + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bytes Content = 1; + */ + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + * required bytes Content = 1; + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + content_ = value; + onChanged(); + return this; + } + /** + * required bytes Content = 1; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000001); + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private java.lang.Object fileExtension_ = ""; + /** + * optional string FileExtension = 2; + */ + public boolean hasFileExtension() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string FileExtension = 2; + */ + public java.lang.String getFileExtension() { + java.lang.Object ref = fileExtension_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + fileExtension_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string FileExtension = 2; + */ + public com.google.protobuf.ByteString + getFileExtensionBytes() { + java.lang.Object ref = fileExtension_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fileExtension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string FileExtension = 2; + */ + public Builder setFileExtension( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + fileExtension_ = value; + onChanged(); + return this; + } + /** + * optional string FileExtension = 2; + */ + public Builder clearFileExtension() { + bitField0_ = (bitField0_ & ~0x00000002); + fileExtension_ = getDefaultInstance().getFileExtension(); + onChanged(); + return this; + } + /** + * optional string FileExtension = 2; + */ + public Builder setFileExtensionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + fileExtension_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:Diadoc.Api.Proto.FileToUpload) + } + + static { + defaultInstance = new FileToUpload(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:Diadoc.Api.Proto.FileToUpload) + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Diadoc_Api_Proto_FileToUpload_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Diadoc_Api_Proto_FileToUpload_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\022FileToUpload.proto\022\020Diadoc.Api.Proto\"6" + + "\n\014FileToUpload\022\017\n\007Content\030\001 \002(\014\022\025\n\rFileE" + + "xtension\030\002 \001(\tB\024B\022FileToUploadProtos" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Diadoc_Api_Proto_FileToUpload_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Diadoc_Api_Proto_FileToUpload_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Diadoc_Api_Proto_FileToUpload_descriptor, + new java.lang.String[] { "Content", "FileExtension", }); + } + + // @@protoc_insertion_point(outer_class_scope) +}