com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: contract_delete.proto
package com.hederahashgraph.api.proto.java;
/**
*
**
* At consensus, marks a contract as deleted and transfers its remaining hBars, if any, to a
* designated receiver. After a contract is deleted, it can no longer be called.
*
* If the target contract is immutable (that is, was created without an admin key), then this
* transaction resolves to MODIFYING_IMMUTABLE_CONTRACT.
*
* --- Signing Requirements ---
* 1. The admin key of the target contract must sign.
* 2. If the transfer account or contract has receiverSigRequired, its associated key must also sign
*
*
* Protobuf type {@code proto.ContractDeleteTransactionBody}
*/
public final class ContractDeleteTransactionBody extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.ContractDeleteTransactionBody)
ContractDeleteTransactionBodyOrBuilder {
private static final long serialVersionUID = 0L;
// Use ContractDeleteTransactionBody.newBuilder() to construct.
private ContractDeleteTransactionBody(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ContractDeleteTransactionBody() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ContractDeleteTransactionBody();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ContractDeleteTransactionBody(
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.ContractID.Builder subBuilder = null;
if (contractID_ != null) {
subBuilder = contractID_.toBuilder();
}
contractID_ = input.readMessage(com.hederahashgraph.api.proto.java.ContractID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(contractID_);
contractID_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.hederahashgraph.api.proto.java.AccountID.Builder subBuilder = null;
if (obtainersCase_ == 2) {
subBuilder = ((com.hederahashgraph.api.proto.java.AccountID) obtainers_).toBuilder();
}
obtainers_ =
input.readMessage(com.hederahashgraph.api.proto.java.AccountID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.AccountID) obtainers_);
obtainers_ = subBuilder.buildPartial();
}
obtainersCase_ = 2;
break;
}
case 26: {
com.hederahashgraph.api.proto.java.ContractID.Builder subBuilder = null;
if (obtainersCase_ == 3) {
subBuilder = ((com.hederahashgraph.api.proto.java.ContractID) obtainers_).toBuilder();
}
obtainers_ =
input.readMessage(com.hederahashgraph.api.proto.java.ContractID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.ContractID) obtainers_);
obtainers_ = subBuilder.buildPartial();
}
obtainersCase_ = 3;
break;
}
case 32: {
permanentRemoval_ = input.readBool();
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.ContractDelete.internal_static_proto_ContractDeleteTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.ContractDelete.internal_static_proto_ContractDeleteTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody.class, com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody.Builder.class);
}
private int obtainersCase_ = 0;
private java.lang.Object obtainers_;
public enum ObtainersCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
TRANSFERACCOUNTID(2),
TRANSFERCONTRACTID(3),
OBTAINERS_NOT_SET(0);
private final int value;
private ObtainersCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ObtainersCase valueOf(int value) {
return forNumber(value);
}
public static ObtainersCase forNumber(int value) {
switch (value) {
case 2: return TRANSFERACCOUNTID;
case 3: return TRANSFERCONTRACTID;
case 0: return OBTAINERS_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ObtainersCase
getObtainersCase() {
return ObtainersCase.forNumber(
obtainersCase_);
}
public static final int CONTRACTID_FIELD_NUMBER = 1;
private com.hederahashgraph.api.proto.java.ContractID contractID_;
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
* @return Whether the contractID field is set.
*/
@java.lang.Override
public boolean hasContractID() {
return contractID_ != null;
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
* @return The contractID.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractID getContractID() {
return contractID_ == null ? com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance() : contractID_;
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractIDOrBuilder getContractIDOrBuilder() {
return getContractID();
}
public static final int TRANSFERACCOUNTID_FIELD_NUMBER = 2;
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
* @return Whether the transferAccountID field is set.
*/
@java.lang.Override
public boolean hasTransferAccountID() {
return obtainersCase_ == 2;
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
* @return The transferAccountID.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.AccountID getTransferAccountID() {
if (obtainersCase_ == 2) {
return (com.hederahashgraph.api.proto.java.AccountID) obtainers_;
}
return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance();
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getTransferAccountIDOrBuilder() {
if (obtainersCase_ == 2) {
return (com.hederahashgraph.api.proto.java.AccountID) obtainers_;
}
return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance();
}
public static final int TRANSFERCONTRACTID_FIELD_NUMBER = 3;
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
* @return Whether the transferContractID field is set.
*/
@java.lang.Override
public boolean hasTransferContractID() {
return obtainersCase_ == 3;
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
* @return The transferContractID.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractID getTransferContractID() {
if (obtainersCase_ == 3) {
return (com.hederahashgraph.api.proto.java.ContractID) obtainers_;
}
return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance();
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractIDOrBuilder getTransferContractIDOrBuilder() {
if (obtainersCase_ == 3) {
return (com.hederahashgraph.api.proto.java.ContractID) obtainers_;
}
return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance();
}
public static final int PERMANENT_REMOVAL_FIELD_NUMBER = 4;
private boolean permanentRemoval_;
/**
*
**
* If set to true, means this is a "synthetic" system transaction being used to
* alert mirror nodes that the contract is being permanently removed from the ledger.
* <b>IMPORTANT:</b> User transactions cannot set this field to true, as permanent
* removal is always managed by the ledger itself. Any ContractDeleteTransactionBody
* submitted to HAPI with permanent_removal=true will be rejected with precheck status
* PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION.
*
*
* bool permanent_removal = 4;
* @return The permanentRemoval.
*/
@java.lang.Override
public boolean getPermanentRemoval() {
return permanentRemoval_;
}
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 (contractID_ != null) {
output.writeMessage(1, getContractID());
}
if (obtainersCase_ == 2) {
output.writeMessage(2, (com.hederahashgraph.api.proto.java.AccountID) obtainers_);
}
if (obtainersCase_ == 3) {
output.writeMessage(3, (com.hederahashgraph.api.proto.java.ContractID) obtainers_);
}
if (permanentRemoval_ != false) {
output.writeBool(4, permanentRemoval_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (contractID_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContractID());
}
if (obtainersCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.hederahashgraph.api.proto.java.AccountID) obtainers_);
}
if (obtainersCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.hederahashgraph.api.proto.java.ContractID) obtainers_);
}
if (permanentRemoval_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, permanentRemoval_);
}
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.ContractDeleteTransactionBody)) {
return super.equals(obj);
}
com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody other = (com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody) obj;
if (hasContractID() != other.hasContractID()) return false;
if (hasContractID()) {
if (!getContractID()
.equals(other.getContractID())) return false;
}
if (getPermanentRemoval()
!= other.getPermanentRemoval()) return false;
if (!getObtainersCase().equals(other.getObtainersCase())) return false;
switch (obtainersCase_) {
case 2:
if (!getTransferAccountID()
.equals(other.getTransferAccountID())) return false;
break;
case 3:
if (!getTransferContractID()
.equals(other.getTransferContractID())) return false;
break;
case 0:
default:
}
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 (hasContractID()) {
hash = (37 * hash) + CONTRACTID_FIELD_NUMBER;
hash = (53 * hash) + getContractID().hashCode();
}
hash = (37 * hash) + PERMANENT_REMOVAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPermanentRemoval());
switch (obtainersCase_) {
case 2:
hash = (37 * hash) + TRANSFERACCOUNTID_FIELD_NUMBER;
hash = (53 * hash) + getTransferAccountID().hashCode();
break;
case 3:
hash = (37 * hash) + TRANSFERCONTRACTID_FIELD_NUMBER;
hash = (53 * hash) + getTransferContractID().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody 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.ContractDeleteTransactionBody parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody 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.ContractDeleteTransactionBody parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody 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.ContractDeleteTransactionBody parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody 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.ContractDeleteTransactionBody parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody 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.ContractDeleteTransactionBody 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.ContractDeleteTransactionBody 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.ContractDeleteTransactionBody 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;
}
/**
*
**
* At consensus, marks a contract as deleted and transfers its remaining hBars, if any, to a
* designated receiver. After a contract is deleted, it can no longer be called.
*
* If the target contract is immutable (that is, was created without an admin key), then this
* transaction resolves to MODIFYING_IMMUTABLE_CONTRACT.
*
* --- Signing Requirements ---
* 1. The admin key of the target contract must sign.
* 2. If the transfer account or contract has receiverSigRequired, its associated key must also sign
*
*
* Protobuf type {@code proto.ContractDeleteTransactionBody}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.ContractDeleteTransactionBody)
com.hederahashgraph.api.proto.java.ContractDeleteTransactionBodyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.ContractDelete.internal_static_proto_ContractDeleteTransactionBody_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.ContractDelete.internal_static_proto_ContractDeleteTransactionBody_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody.class, com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody.Builder.class);
}
// Construct using com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody.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 (contractIDBuilder_ == null) {
contractID_ = null;
} else {
contractID_ = null;
contractIDBuilder_ = null;
}
permanentRemoval_ = false;
obtainersCase_ = 0;
obtainers_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hederahashgraph.api.proto.java.ContractDelete.internal_static_proto_ContractDeleteTransactionBody_descriptor;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody getDefaultInstanceForType() {
return com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody.getDefaultInstance();
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody build() {
com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody buildPartial() {
com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody result = new com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody(this);
if (contractIDBuilder_ == null) {
result.contractID_ = contractID_;
} else {
result.contractID_ = contractIDBuilder_.build();
}
if (obtainersCase_ == 2) {
if (transferAccountIDBuilder_ == null) {
result.obtainers_ = obtainers_;
} else {
result.obtainers_ = transferAccountIDBuilder_.build();
}
}
if (obtainersCase_ == 3) {
if (transferContractIDBuilder_ == null) {
result.obtainers_ = obtainers_;
} else {
result.obtainers_ = transferContractIDBuilder_.build();
}
}
result.permanentRemoval_ = permanentRemoval_;
result.obtainersCase_ = obtainersCase_;
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.ContractDeleteTransactionBody) {
return mergeFrom((com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody other) {
if (other == com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody.getDefaultInstance()) return this;
if (other.hasContractID()) {
mergeContractID(other.getContractID());
}
if (other.getPermanentRemoval() != false) {
setPermanentRemoval(other.getPermanentRemoval());
}
switch (other.getObtainersCase()) {
case TRANSFERACCOUNTID: {
mergeTransferAccountID(other.getTransferAccountID());
break;
}
case TRANSFERCONTRACTID: {
mergeTransferContractID(other.getTransferContractID());
break;
}
case OBTAINERS_NOT_SET: {
break;
}
}
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.ContractDeleteTransactionBody parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int obtainersCase_ = 0;
private java.lang.Object obtainers_;
public ObtainersCase
getObtainersCase() {
return ObtainersCase.forNumber(
obtainersCase_);
}
public Builder clearObtainers() {
obtainersCase_ = 0;
obtainers_ = null;
onChanged();
return this;
}
private com.hederahashgraph.api.proto.java.ContractID contractID_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder> contractIDBuilder_;
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
* @return Whether the contractID field is set.
*/
public boolean hasContractID() {
return contractIDBuilder_ != null || contractID_ != null;
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
* @return The contractID.
*/
public com.hederahashgraph.api.proto.java.ContractID getContractID() {
if (contractIDBuilder_ == null) {
return contractID_ == null ? com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance() : contractID_;
} else {
return contractIDBuilder_.getMessage();
}
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
public Builder setContractID(com.hederahashgraph.api.proto.java.ContractID value) {
if (contractIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
contractID_ = value;
onChanged();
} else {
contractIDBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
public Builder setContractID(
com.hederahashgraph.api.proto.java.ContractID.Builder builderForValue) {
if (contractIDBuilder_ == null) {
contractID_ = builderForValue.build();
onChanged();
} else {
contractIDBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
public Builder mergeContractID(com.hederahashgraph.api.proto.java.ContractID value) {
if (contractIDBuilder_ == null) {
if (contractID_ != null) {
contractID_ =
com.hederahashgraph.api.proto.java.ContractID.newBuilder(contractID_).mergeFrom(value).buildPartial();
} else {
contractID_ = value;
}
onChanged();
} else {
contractIDBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
public Builder clearContractID() {
if (contractIDBuilder_ == null) {
contractID_ = null;
onChanged();
} else {
contractID_ = null;
contractIDBuilder_ = null;
}
return this;
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
public com.hederahashgraph.api.proto.java.ContractID.Builder getContractIDBuilder() {
onChanged();
return getContractIDFieldBuilder().getBuilder();
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
public com.hederahashgraph.api.proto.java.ContractIDOrBuilder getContractIDOrBuilder() {
if (contractIDBuilder_ != null) {
return contractIDBuilder_.getMessageOrBuilder();
} else {
return contractID_ == null ?
com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance() : contractID_;
}
}
/**
*
**
* The id of the contract to be deleted
*
*
* .proto.ContractID contractID = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder>
getContractIDFieldBuilder() {
if (contractIDBuilder_ == null) {
contractIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder>(
getContractID(),
getParentForChildren(),
isClean());
contractID_ = null;
}
return contractIDBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder> transferAccountIDBuilder_;
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
* @return Whether the transferAccountID field is set.
*/
@java.lang.Override
public boolean hasTransferAccountID() {
return obtainersCase_ == 2;
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
* @return The transferAccountID.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.AccountID getTransferAccountID() {
if (transferAccountIDBuilder_ == null) {
if (obtainersCase_ == 2) {
return (com.hederahashgraph.api.proto.java.AccountID) obtainers_;
}
return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance();
} else {
if (obtainersCase_ == 2) {
return transferAccountIDBuilder_.getMessage();
}
return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance();
}
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
public Builder setTransferAccountID(com.hederahashgraph.api.proto.java.AccountID value) {
if (transferAccountIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
obtainers_ = value;
onChanged();
} else {
transferAccountIDBuilder_.setMessage(value);
}
obtainersCase_ = 2;
return this;
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
public Builder setTransferAccountID(
com.hederahashgraph.api.proto.java.AccountID.Builder builderForValue) {
if (transferAccountIDBuilder_ == null) {
obtainers_ = builderForValue.build();
onChanged();
} else {
transferAccountIDBuilder_.setMessage(builderForValue.build());
}
obtainersCase_ = 2;
return this;
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
public Builder mergeTransferAccountID(com.hederahashgraph.api.proto.java.AccountID value) {
if (transferAccountIDBuilder_ == null) {
if (obtainersCase_ == 2 &&
obtainers_ != com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance()) {
obtainers_ = com.hederahashgraph.api.proto.java.AccountID.newBuilder((com.hederahashgraph.api.proto.java.AccountID) obtainers_)
.mergeFrom(value).buildPartial();
} else {
obtainers_ = value;
}
onChanged();
} else {
if (obtainersCase_ == 2) {
transferAccountIDBuilder_.mergeFrom(value);
}
transferAccountIDBuilder_.setMessage(value);
}
obtainersCase_ = 2;
return this;
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
public Builder clearTransferAccountID() {
if (transferAccountIDBuilder_ == null) {
if (obtainersCase_ == 2) {
obtainersCase_ = 0;
obtainers_ = null;
onChanged();
}
} else {
if (obtainersCase_ == 2) {
obtainersCase_ = 0;
obtainers_ = null;
}
transferAccountIDBuilder_.clear();
}
return this;
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
public com.hederahashgraph.api.proto.java.AccountID.Builder getTransferAccountIDBuilder() {
return getTransferAccountIDFieldBuilder().getBuilder();
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getTransferAccountIDOrBuilder() {
if ((obtainersCase_ == 2) && (transferAccountIDBuilder_ != null)) {
return transferAccountIDBuilder_.getMessageOrBuilder();
} else {
if (obtainersCase_ == 2) {
return (com.hederahashgraph.api.proto.java.AccountID) obtainers_;
}
return com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance();
}
}
/**
*
**
* The id of an account to receive any remaining hBars from the deleted contract
*
*
* .proto.AccountID transferAccountID = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>
getTransferAccountIDFieldBuilder() {
if (transferAccountIDBuilder_ == null) {
if (!(obtainersCase_ == 2)) {
obtainers_ = com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance();
}
transferAccountIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>(
(com.hederahashgraph.api.proto.java.AccountID) obtainers_,
getParentForChildren(),
isClean());
obtainers_ = null;
}
obtainersCase_ = 2;
onChanged();;
return transferAccountIDBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder> transferContractIDBuilder_;
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
* @return Whether the transferContractID field is set.
*/
@java.lang.Override
public boolean hasTransferContractID() {
return obtainersCase_ == 3;
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
* @return The transferContractID.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractID getTransferContractID() {
if (transferContractIDBuilder_ == null) {
if (obtainersCase_ == 3) {
return (com.hederahashgraph.api.proto.java.ContractID) obtainers_;
}
return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance();
} else {
if (obtainersCase_ == 3) {
return transferContractIDBuilder_.getMessage();
}
return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance();
}
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
public Builder setTransferContractID(com.hederahashgraph.api.proto.java.ContractID value) {
if (transferContractIDBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
obtainers_ = value;
onChanged();
} else {
transferContractIDBuilder_.setMessage(value);
}
obtainersCase_ = 3;
return this;
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
public Builder setTransferContractID(
com.hederahashgraph.api.proto.java.ContractID.Builder builderForValue) {
if (transferContractIDBuilder_ == null) {
obtainers_ = builderForValue.build();
onChanged();
} else {
transferContractIDBuilder_.setMessage(builderForValue.build());
}
obtainersCase_ = 3;
return this;
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
public Builder mergeTransferContractID(com.hederahashgraph.api.proto.java.ContractID value) {
if (transferContractIDBuilder_ == null) {
if (obtainersCase_ == 3 &&
obtainers_ != com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance()) {
obtainers_ = com.hederahashgraph.api.proto.java.ContractID.newBuilder((com.hederahashgraph.api.proto.java.ContractID) obtainers_)
.mergeFrom(value).buildPartial();
} else {
obtainers_ = value;
}
onChanged();
} else {
if (obtainersCase_ == 3) {
transferContractIDBuilder_.mergeFrom(value);
}
transferContractIDBuilder_.setMessage(value);
}
obtainersCase_ = 3;
return this;
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
public Builder clearTransferContractID() {
if (transferContractIDBuilder_ == null) {
if (obtainersCase_ == 3) {
obtainersCase_ = 0;
obtainers_ = null;
onChanged();
}
} else {
if (obtainersCase_ == 3) {
obtainersCase_ = 0;
obtainers_ = null;
}
transferContractIDBuilder_.clear();
}
return this;
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
public com.hederahashgraph.api.proto.java.ContractID.Builder getTransferContractIDBuilder() {
return getTransferContractIDFieldBuilder().getBuilder();
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ContractIDOrBuilder getTransferContractIDOrBuilder() {
if ((obtainersCase_ == 3) && (transferContractIDBuilder_ != null)) {
return transferContractIDBuilder_.getMessageOrBuilder();
} else {
if (obtainersCase_ == 3) {
return (com.hederahashgraph.api.proto.java.ContractID) obtainers_;
}
return com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance();
}
}
/**
*
**
* The id of a contract to receive any remaining hBars from the deleted contract
*
*
* .proto.ContractID transferContractID = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder>
getTransferContractIDFieldBuilder() {
if (transferContractIDBuilder_ == null) {
if (!(obtainersCase_ == 3)) {
obtainers_ = com.hederahashgraph.api.proto.java.ContractID.getDefaultInstance();
}
transferContractIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.ContractID, com.hederahashgraph.api.proto.java.ContractID.Builder, com.hederahashgraph.api.proto.java.ContractIDOrBuilder>(
(com.hederahashgraph.api.proto.java.ContractID) obtainers_,
getParentForChildren(),
isClean());
obtainers_ = null;
}
obtainersCase_ = 3;
onChanged();;
return transferContractIDBuilder_;
}
private boolean permanentRemoval_ ;
/**
*
**
* If set to true, means this is a "synthetic" system transaction being used to
* alert mirror nodes that the contract is being permanently removed from the ledger.
* <b>IMPORTANT:</b> User transactions cannot set this field to true, as permanent
* removal is always managed by the ledger itself. Any ContractDeleteTransactionBody
* submitted to HAPI with permanent_removal=true will be rejected with precheck status
* PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION.
*
*
* bool permanent_removal = 4;
* @return The permanentRemoval.
*/
@java.lang.Override
public boolean getPermanentRemoval() {
return permanentRemoval_;
}
/**
*
**
* If set to true, means this is a "synthetic" system transaction being used to
* alert mirror nodes that the contract is being permanently removed from the ledger.
* <b>IMPORTANT:</b> User transactions cannot set this field to true, as permanent
* removal is always managed by the ledger itself. Any ContractDeleteTransactionBody
* submitted to HAPI with permanent_removal=true will be rejected with precheck status
* PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION.
*
*
* bool permanent_removal = 4;
* @param value The permanentRemoval to set.
* @return This builder for chaining.
*/
public Builder setPermanentRemoval(boolean value) {
permanentRemoval_ = value;
onChanged();
return this;
}
/**
*
**
* If set to true, means this is a "synthetic" system transaction being used to
* alert mirror nodes that the contract is being permanently removed from the ledger.
* <b>IMPORTANT:</b> User transactions cannot set this field to true, as permanent
* removal is always managed by the ledger itself. Any ContractDeleteTransactionBody
* submitted to HAPI with permanent_removal=true will be rejected with precheck status
* PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION.
*
*
* bool permanent_removal = 4;
* @return This builder for chaining.
*/
public Builder clearPermanentRemoval() {
permanentRemoval_ = false;
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.ContractDeleteTransactionBody)
}
// @@protoc_insertion_point(class_scope:proto.ContractDeleteTransactionBody)
private static final com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody();
}
public static com.hederahashgraph.api.proto.java.ContractDeleteTransactionBody getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ContractDeleteTransactionBody parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ContractDeleteTransactionBody(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.ContractDeleteTransactionBody getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy