com.hederahashgraph.api.proto.java.File Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: state/file/file.proto
package com.hederahashgraph.api.proto.java;
/**
*
**
* Representation of a Hedera Token Service file in the network Merkle tree.
* As with all network entities, a file has a unique entity number, which is given along
* with the network's shard and realm in the form of a shard.realm.number id.
*
*
* Protobuf type {@code proto.File}
*/
public final class File extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.File)
FileOrBuilder {
private static final long serialVersionUID = 0L;
// Use File.newBuilder() to construct.
private File(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private File() {
contents_ = com.google.protobuf.ByteString.EMPTY;
memo_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new File();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private File(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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;
case 10: {
com.hederahashgraph.api.proto.java.FileID.Builder subBuilder = null;
if (fileId_ != null) {
subBuilder = fileId_.toBuilder();
}
fileId_ = input.readMessage(com.hederahashgraph.api.proto.java.FileID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fileId_);
fileId_ = subBuilder.buildPartial();
}
break;
}
case 16: {
expirationSecond_ = input.readInt64();
break;
}
case 26: {
com.hederahashgraph.api.proto.java.KeyList.Builder subBuilder = null;
if (keys_ != null) {
subBuilder = keys_.toBuilder();
}
keys_ = input.readMessage(com.hederahashgraph.api.proto.java.KeyList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(keys_);
keys_ = subBuilder.buildPartial();
}
break;
}
case 34: {
contents_ = input.readBytes();
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
memo_ = s;
break;
}
case 48: {
deleted_ = input.readBool();
break;
}
case 56: {
preSystemDeleteExpirationSecond_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.FileOuterClass.internal_static_proto_File_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.FileOuterClass.internal_static_proto_File_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.File.class, com.hederahashgraph.api.proto.java.File.Builder.class);
}
public static final int FILE_ID_FIELD_NUMBER = 1;
private com.hederahashgraph.api.proto.java.FileID fileId_;
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
* @return Whether the fileId field is set.
*/
@java.lang.Override
public boolean hasFileId() {
return fileId_ != null;
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
* @return The fileId.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.FileID getFileId() {
return fileId_ == null ? com.hederahashgraph.api.proto.java.FileID.getDefaultInstance() : fileId_;
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.FileIDOrBuilder getFileIdOrBuilder() {
return getFileId();
}
public static final int EXPIRATION_SECOND_FIELD_NUMBER = 2;
private long expirationSecond_;
/**
*
**
* The file's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 2;
* @return The expirationSecond.
*/
@java.lang.Override
public long getExpirationSecond() {
return expirationSecond_;
}
public static final int KEYS_FIELD_NUMBER = 3;
private com.hederahashgraph.api.proto.java.KeyList keys_;
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
* @return Whether the keys field is set.
*/
@java.lang.Override
public boolean hasKeys() {
return keys_ != null;
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
* @return The keys.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.KeyList getKeys() {
return keys_ == null ? com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance() : keys_;
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.KeyListOrBuilder getKeysOrBuilder() {
return getKeys();
}
public static final int CONTENTS_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString contents_;
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @return The contents.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContents() {
return contents_;
}
public static final int MEMO_FIELD_NUMBER = 5;
private volatile java.lang.Object memo_;
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 5;
* @return The memo.
*/
@java.lang.Override
public java.lang.String getMemo() {
java.lang.Object ref = memo_;
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();
memo_ = s;
return s;
}
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 5;
* @return The bytes for memo.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMemoBytes() {
java.lang.Object ref = memo_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
memo_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DELETED_FIELD_NUMBER = 6;
private boolean deleted_;
/**
*
**
* Whether this file is deleted.
*
*
* bool deleted = 6;
* @return The deleted.
*/
@java.lang.Override
public boolean getDeleted() {
return deleted_;
}
public static final int PRE_SYSTEM_DELETE_EXPIRATION_SECOND_FIELD_NUMBER = 7;
private long preSystemDeleteExpirationSecond_;
/**
*
**
* The pre system delete expiration time in seconds
*
*
* int64 pre_system_delete_expiration_second = 7;
* @return The preSystemDeleteExpirationSecond.
*/
@java.lang.Override
public long getPreSystemDeleteExpirationSecond() {
return preSystemDeleteExpirationSecond_;
}
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 (fileId_ != null) {
output.writeMessage(1, getFileId());
}
if (expirationSecond_ != 0L) {
output.writeInt64(2, expirationSecond_);
}
if (keys_ != null) {
output.writeMessage(3, getKeys());
}
if (!contents_.isEmpty()) {
output.writeBytes(4, contents_);
}
if (!getMemoBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, memo_);
}
if (deleted_ != false) {
output.writeBool(6, deleted_);
}
if (preSystemDeleteExpirationSecond_ != 0L) {
output.writeInt64(7, preSystemDeleteExpirationSecond_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (fileId_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getFileId());
}
if (expirationSecond_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, expirationSecond_);
}
if (keys_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getKeys());
}
if (!contents_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, contents_);
}
if (!getMemoBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, memo_);
}
if (deleted_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, deleted_);
}
if (preSystemDeleteExpirationSecond_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(7, preSystemDeleteExpirationSecond_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hederahashgraph.api.proto.java.File)) {
return super.equals(obj);
}
com.hederahashgraph.api.proto.java.File other = (com.hederahashgraph.api.proto.java.File) obj;
if (hasFileId() != other.hasFileId()) return false;
if (hasFileId()) {
if (!getFileId()
.equals(other.getFileId())) return false;
}
if (getExpirationSecond()
!= other.getExpirationSecond()) return false;
if (hasKeys() != other.hasKeys()) return false;
if (hasKeys()) {
if (!getKeys()
.equals(other.getKeys())) return false;
}
if (!getContents()
.equals(other.getContents())) return false;
if (!getMemo()
.equals(other.getMemo())) return false;
if (getDeleted()
!= other.getDeleted()) return false;
if (getPreSystemDeleteExpirationSecond()
!= other.getPreSystemDeleteExpirationSecond()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasFileId()) {
hash = (37 * hash) + FILE_ID_FIELD_NUMBER;
hash = (53 * hash) + getFileId().hashCode();
}
hash = (37 * hash) + EXPIRATION_SECOND_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getExpirationSecond());
if (hasKeys()) {
hash = (37 * hash) + KEYS_FIELD_NUMBER;
hash = (53 * hash) + getKeys().hashCode();
}
hash = (37 * hash) + CONTENTS_FIELD_NUMBER;
hash = (53 * hash) + getContents().hashCode();
hash = (37 * hash) + MEMO_FIELD_NUMBER;
hash = (53 * hash) + getMemo().hashCode();
hash = (37 * hash) + DELETED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeleted());
hash = (37 * hash) + PRE_SYSTEM_DELETE_EXPIRATION_SECOND_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getPreSystemDeleteExpirationSecond());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hederahashgraph.api.proto.java.File parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.File parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.File parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.File parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.File parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.File parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.File parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.File 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 com.hederahashgraph.api.proto.java.File parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.File 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 com.hederahashgraph.api.proto.java.File parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.File 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(com.hederahashgraph.api.proto.java.File 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;
}
/**
*
**
* Representation of a Hedera Token Service file in the network Merkle tree.
* As with all network entities, a file has a unique entity number, which is given along
* with the network's shard and realm in the form of a shard.realm.number id.
*
*
* Protobuf type {@code proto.File}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.File)
com.hederahashgraph.api.proto.java.FileOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.FileOuterClass.internal_static_proto_File_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.FileOuterClass.internal_static_proto_File_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.File.class, com.hederahashgraph.api.proto.java.File.Builder.class);
}
// Construct using com.hederahashgraph.api.proto.java.File.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (fileIdBuilder_ == null) {
fileId_ = null;
} else {
fileId_ = null;
fileIdBuilder_ = null;
}
expirationSecond_ = 0L;
if (keysBuilder_ == null) {
keys_ = null;
} else {
keys_ = null;
keysBuilder_ = null;
}
contents_ = com.google.protobuf.ByteString.EMPTY;
memo_ = "";
deleted_ = false;
preSystemDeleteExpirationSecond_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hederahashgraph.api.proto.java.FileOuterClass.internal_static_proto_File_descriptor;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.File getDefaultInstanceForType() {
return com.hederahashgraph.api.proto.java.File.getDefaultInstance();
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.File build() {
com.hederahashgraph.api.proto.java.File result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.File buildPartial() {
com.hederahashgraph.api.proto.java.File result = new com.hederahashgraph.api.proto.java.File(this);
if (fileIdBuilder_ == null) {
result.fileId_ = fileId_;
} else {
result.fileId_ = fileIdBuilder_.build();
}
result.expirationSecond_ = expirationSecond_;
if (keysBuilder_ == null) {
result.keys_ = keys_;
} else {
result.keys_ = keysBuilder_.build();
}
result.contents_ = contents_;
result.memo_ = memo_;
result.deleted_ = deleted_;
result.preSystemDeleteExpirationSecond_ = preSystemDeleteExpirationSecond_;
onBuilt();
return result;
}
@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 com.hederahashgraph.api.proto.java.File) {
return mergeFrom((com.hederahashgraph.api.proto.java.File)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hederahashgraph.api.proto.java.File other) {
if (other == com.hederahashgraph.api.proto.java.File.getDefaultInstance()) return this;
if (other.hasFileId()) {
mergeFileId(other.getFileId());
}
if (other.getExpirationSecond() != 0L) {
setExpirationSecond(other.getExpirationSecond());
}
if (other.hasKeys()) {
mergeKeys(other.getKeys());
}
if (other.getContents() != com.google.protobuf.ByteString.EMPTY) {
setContents(other.getContents());
}
if (!other.getMemo().isEmpty()) {
memo_ = other.memo_;
onChanged();
}
if (other.getDeleted() != false) {
setDeleted(other.getDeleted());
}
if (other.getPreSystemDeleteExpirationSecond() != 0L) {
setPreSystemDeleteExpirationSecond(other.getPreSystemDeleteExpirationSecond());
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.hederahashgraph.api.proto.java.File parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hederahashgraph.api.proto.java.File) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.hederahashgraph.api.proto.java.FileID fileId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FileID, com.hederahashgraph.api.proto.java.FileID.Builder, com.hederahashgraph.api.proto.java.FileIDOrBuilder> fileIdBuilder_;
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
* @return Whether the fileId field is set.
*/
public boolean hasFileId() {
return fileIdBuilder_ != null || fileId_ != null;
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
* @return The fileId.
*/
public com.hederahashgraph.api.proto.java.FileID getFileId() {
if (fileIdBuilder_ == null) {
return fileId_ == null ? com.hederahashgraph.api.proto.java.FileID.getDefaultInstance() : fileId_;
} else {
return fileIdBuilder_.getMessage();
}
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
public Builder setFileId(com.hederahashgraph.api.proto.java.FileID value) {
if (fileIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fileId_ = value;
onChanged();
} else {
fileIdBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
public Builder setFileId(
com.hederahashgraph.api.proto.java.FileID.Builder builderForValue) {
if (fileIdBuilder_ == null) {
fileId_ = builderForValue.build();
onChanged();
} else {
fileIdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
public Builder mergeFileId(com.hederahashgraph.api.proto.java.FileID value) {
if (fileIdBuilder_ == null) {
if (fileId_ != null) {
fileId_ =
com.hederahashgraph.api.proto.java.FileID.newBuilder(fileId_).mergeFrom(value).buildPartial();
} else {
fileId_ = value;
}
onChanged();
} else {
fileIdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
public Builder clearFileId() {
if (fileIdBuilder_ == null) {
fileId_ = null;
onChanged();
} else {
fileId_ = null;
fileIdBuilder_ = null;
}
return this;
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
public com.hederahashgraph.api.proto.java.FileID.Builder getFileIdBuilder() {
onChanged();
return getFileIdFieldBuilder().getBuilder();
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
public com.hederahashgraph.api.proto.java.FileIDOrBuilder getFileIdOrBuilder() {
if (fileIdBuilder_ != null) {
return fileIdBuilder_.getMessageOrBuilder();
} else {
return fileId_ == null ?
com.hederahashgraph.api.proto.java.FileID.getDefaultInstance() : fileId_;
}
}
/**
*
**
* The file's unique file identifier in the Merkle state.
*
*
* .proto.FileID file_id = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FileID, com.hederahashgraph.api.proto.java.FileID.Builder, com.hederahashgraph.api.proto.java.FileIDOrBuilder>
getFileIdFieldBuilder() {
if (fileIdBuilder_ == null) {
fileIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FileID, com.hederahashgraph.api.proto.java.FileID.Builder, com.hederahashgraph.api.proto.java.FileIDOrBuilder>(
getFileId(),
getParentForChildren(),
isClean());
fileId_ = null;
}
return fileIdBuilder_;
}
private long expirationSecond_ ;
/**
*
**
* The file's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 2;
* @return The expirationSecond.
*/
@java.lang.Override
public long getExpirationSecond() {
return expirationSecond_;
}
/**
*
**
* The file's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 2;
* @param value The expirationSecond to set.
* @return This builder for chaining.
*/
public Builder setExpirationSecond(long value) {
expirationSecond_ = value;
onChanged();
return this;
}
/**
*
**
* The file's consensus expiration time in seconds since the epoch.
*
*
* int64 expiration_second = 2;
* @return This builder for chaining.
*/
public Builder clearExpirationSecond() {
expirationSecond_ = 0L;
onChanged();
return this;
}
private com.hederahashgraph.api.proto.java.KeyList keys_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder> keysBuilder_;
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
* @return Whether the keys field is set.
*/
public boolean hasKeys() {
return keysBuilder_ != null || keys_ != null;
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
* @return The keys.
*/
public com.hederahashgraph.api.proto.java.KeyList getKeys() {
if (keysBuilder_ == null) {
return keys_ == null ? com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance() : keys_;
} else {
return keysBuilder_.getMessage();
}
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder setKeys(com.hederahashgraph.api.proto.java.KeyList value) {
if (keysBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
keys_ = value;
onChanged();
} else {
keysBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder setKeys(
com.hederahashgraph.api.proto.java.KeyList.Builder builderForValue) {
if (keysBuilder_ == null) {
keys_ = builderForValue.build();
onChanged();
} else {
keysBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder mergeKeys(com.hederahashgraph.api.proto.java.KeyList value) {
if (keysBuilder_ == null) {
if (keys_ != null) {
keys_ =
com.hederahashgraph.api.proto.java.KeyList.newBuilder(keys_).mergeFrom(value).buildPartial();
} else {
keys_ = value;
}
onChanged();
} else {
keysBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public Builder clearKeys() {
if (keysBuilder_ == null) {
keys_ = null;
onChanged();
} else {
keys_ = null;
keysBuilder_ = null;
}
return this;
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public com.hederahashgraph.api.proto.java.KeyList.Builder getKeysBuilder() {
onChanged();
return getKeysFieldBuilder().getBuilder();
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
public com.hederahashgraph.api.proto.java.KeyListOrBuilder getKeysOrBuilder() {
if (keysBuilder_ != null) {
return keysBuilder_.getMessageOrBuilder();
} else {
return keys_ == null ?
com.hederahashgraph.api.proto.java.KeyList.getDefaultInstance() : keys_;
}
}
/**
*
**
* All keys at the top level of a key list must sign to create, modify and delete the file.
*
*
* .proto.KeyList keys = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder>
getKeysFieldBuilder() {
if (keysBuilder_ == null) {
keysBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.KeyList, com.hederahashgraph.api.proto.java.KeyList.Builder, com.hederahashgraph.api.proto.java.KeyListOrBuilder>(
getKeys(),
getParentForChildren(),
isClean());
keys_ = null;
}
return keysBuilder_;
}
private com.google.protobuf.ByteString contents_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @return The contents.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContents() {
return contents_;
}
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @param value The contents to set.
* @return This builder for chaining.
*/
public Builder setContents(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
contents_ = value;
onChanged();
return this;
}
/**
*
**
* The bytes that are the contents of the file
*
*
* bytes contents = 4;
* @return This builder for chaining.
*/
public Builder clearContents() {
contents_ = getDefaultInstance().getContents();
onChanged();
return this;
}
private java.lang.Object memo_ = "";
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 5;
* @return The memo.
*/
public java.lang.String getMemo() {
java.lang.Object ref = memo_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
memo_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 5;
* @return The bytes for memo.
*/
public com.google.protobuf.ByteString
getMemoBytes() {
java.lang.Object ref = memo_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
memo_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 5;
* @param value The memo to set.
* @return This builder for chaining.
*/
public Builder setMemo(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
memo_ = value;
onChanged();
return this;
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 5;
* @return This builder for chaining.
*/
public Builder clearMemo() {
memo_ = getDefaultInstance().getMemo();
onChanged();
return this;
}
/**
*
**
* The memo associated with the file (UTF-8 encoding max 100 bytes)
*
*
* string memo = 5;
* @param value The bytes for memo to set.
* @return This builder for chaining.
*/
public Builder setMemoBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
memo_ = value;
onChanged();
return this;
}
private boolean deleted_ ;
/**
*
**
* Whether this file is deleted.
*
*
* bool deleted = 6;
* @return The deleted.
*/
@java.lang.Override
public boolean getDeleted() {
return deleted_;
}
/**
*
**
* Whether this file is deleted.
*
*
* bool deleted = 6;
* @param value The deleted to set.
* @return This builder for chaining.
*/
public Builder setDeleted(boolean value) {
deleted_ = value;
onChanged();
return this;
}
/**
*
**
* Whether this file is deleted.
*
*
* bool deleted = 6;
* @return This builder for chaining.
*/
public Builder clearDeleted() {
deleted_ = false;
onChanged();
return this;
}
private long preSystemDeleteExpirationSecond_ ;
/**
*
**
* The pre system delete expiration time in seconds
*
*
* int64 pre_system_delete_expiration_second = 7;
* @return The preSystemDeleteExpirationSecond.
*/
@java.lang.Override
public long getPreSystemDeleteExpirationSecond() {
return preSystemDeleteExpirationSecond_;
}
/**
*
**
* The pre system delete expiration time in seconds
*
*
* int64 pre_system_delete_expiration_second = 7;
* @param value The preSystemDeleteExpirationSecond to set.
* @return This builder for chaining.
*/
public Builder setPreSystemDeleteExpirationSecond(long value) {
preSystemDeleteExpirationSecond_ = value;
onChanged();
return this;
}
/**
*
**
* The pre system delete expiration time in seconds
*
*
* int64 pre_system_delete_expiration_second = 7;
* @return This builder for chaining.
*/
public Builder clearPreSystemDeleteExpirationSecond() {
preSystemDeleteExpirationSecond_ = 0L;
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:proto.File)
}
// @@protoc_insertion_point(class_scope:proto.File)
private static final com.hederahashgraph.api.proto.java.File DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.File();
}
public static com.hederahashgraph.api.proto.java.File getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public File parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new File(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.File getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}