org.yamcs.protobuf.RemoteFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-api Show documentation
Show all versions of yamcs-api Show documentation
Used by external clients to communicate with Yamcs
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yamcs/protobuf/cfdp/cfdp.proto
package org.yamcs.protobuf;
/**
* Protobuf type {@code yamcs.protobuf.cfdp.RemoteFile}
*/
public final class RemoteFile extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yamcs.protobuf.cfdp.RemoteFile)
RemoteFileOrBuilder {
private static final long serialVersionUID = 0L;
// Use RemoteFile.newBuilder() to construct.
private RemoteFile(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private RemoteFile() {
filepath_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RemoteFile(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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;
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
filepath_ = bs;
break;
}
case 16: {
bitField0_ |= 0x00000002;
isDirectory_ = 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 org.yamcs.protobuf.CfdpProto.internal_static_yamcs_protobuf_cfdp_RemoteFile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.yamcs.protobuf.CfdpProto.internal_static_yamcs_protobuf_cfdp_RemoteFile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.RemoteFile.class, org.yamcs.protobuf.RemoteFile.Builder.class);
}
private int bitField0_;
public static final int FILEPATH_FIELD_NUMBER = 1;
private volatile java.lang.Object filepath_;
/**
* required string filepath = 1;
*/
public boolean hasFilepath() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* required string filepath = 1;
*/
public java.lang.String getFilepath() {
java.lang.Object ref = filepath_;
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()) {
filepath_ = s;
}
return s;
}
}
/**
* required string filepath = 1;
*/
public com.google.protobuf.ByteString
getFilepathBytes() {
java.lang.Object ref = filepath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
filepath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ISDIRECTORY_FIELD_NUMBER = 2;
private boolean isDirectory_;
/**
* required bool isDirectory = 2;
*/
public boolean hasIsDirectory() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* required bool isDirectory = 2;
*/
public boolean getIsDirectory() {
return isDirectory_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasFilepath()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasIsDirectory()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filepath_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(2, isDirectory_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filepath_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, isDirectory_);
}
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 org.yamcs.protobuf.RemoteFile)) {
return super.equals(obj);
}
org.yamcs.protobuf.RemoteFile other = (org.yamcs.protobuf.RemoteFile) obj;
if (hasFilepath() != other.hasFilepath()) return false;
if (hasFilepath()) {
if (!getFilepath()
.equals(other.getFilepath())) return false;
}
if (hasIsDirectory() != other.hasIsDirectory()) return false;
if (hasIsDirectory()) {
if (getIsDirectory()
!= other.getIsDirectory()) 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 (hasFilepath()) {
hash = (37 * hash) + FILEPATH_FIELD_NUMBER;
hash = (53 * hash) + getFilepath().hashCode();
}
if (hasIsDirectory()) {
hash = (37 * hash) + ISDIRECTORY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsDirectory());
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.yamcs.protobuf.RemoteFile parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.RemoteFile parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.RemoteFile parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.yamcs.protobuf.RemoteFile 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;
}
/**
* Protobuf type {@code yamcs.protobuf.cfdp.RemoteFile}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yamcs.protobuf.cfdp.RemoteFile)
org.yamcs.protobuf.RemoteFileOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.yamcs.protobuf.CfdpProto.internal_static_yamcs_protobuf_cfdp_RemoteFile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.yamcs.protobuf.CfdpProto.internal_static_yamcs_protobuf_cfdp_RemoteFile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.RemoteFile.class, org.yamcs.protobuf.RemoteFile.Builder.class);
}
// Construct using org.yamcs.protobuf.RemoteFile.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();
filepath_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
isDirectory_ = false;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.yamcs.protobuf.CfdpProto.internal_static_yamcs_protobuf_cfdp_RemoteFile_descriptor;
}
@java.lang.Override
public org.yamcs.protobuf.RemoteFile getDefaultInstanceForType() {
return org.yamcs.protobuf.RemoteFile.getDefaultInstance();
}
@java.lang.Override
public org.yamcs.protobuf.RemoteFile build() {
org.yamcs.protobuf.RemoteFile result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.yamcs.protobuf.RemoteFile buildPartial() {
org.yamcs.protobuf.RemoteFile result = new org.yamcs.protobuf.RemoteFile(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
to_bitField0_ |= 0x00000001;
}
result.filepath_ = filepath_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.isDirectory_ = isDirectory_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ = to_bitField0_;
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 org.yamcs.protobuf.RemoteFile) {
return mergeFrom((org.yamcs.protobuf.RemoteFile)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.yamcs.protobuf.RemoteFile other) {
if (other == org.yamcs.protobuf.RemoteFile.getDefaultInstance()) return this;
if (other.hasFilepath()) {
bitField0_ |= 0x00000001;
filepath_ = other.filepath_;
onChanged();
}
if (other.hasIsDirectory()) {
setIsDirectory(other.getIsDirectory());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!hasFilepath()) {
return false;
}
if (!hasIsDirectory()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.yamcs.protobuf.RemoteFile parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.yamcs.protobuf.RemoteFile) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object filepath_ = "";
/**
* required string filepath = 1;
*/
public boolean hasFilepath() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* required string filepath = 1;
*/
public java.lang.String getFilepath() {
java.lang.Object ref = filepath_;
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()) {
filepath_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* required string filepath = 1;
*/
public com.google.protobuf.ByteString
getFilepathBytes() {
java.lang.Object ref = filepath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
filepath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* required string filepath = 1;
*/
public Builder setFilepath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
filepath_ = value;
onChanged();
return this;
}
/**
* required string filepath = 1;
*/
public Builder clearFilepath() {
bitField0_ = (bitField0_ & ~0x00000001);
filepath_ = getDefaultInstance().getFilepath();
onChanged();
return this;
}
/**
* required string filepath = 1;
*/
public Builder setFilepathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
filepath_ = value;
onChanged();
return this;
}
private boolean isDirectory_ ;
/**
* required bool isDirectory = 2;
*/
public boolean hasIsDirectory() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* required bool isDirectory = 2;
*/
public boolean getIsDirectory() {
return isDirectory_;
}
/**
* required bool isDirectory = 2;
*/
public Builder setIsDirectory(boolean value) {
bitField0_ |= 0x00000002;
isDirectory_ = value;
onChanged();
return this;
}
/**
* required bool isDirectory = 2;
*/
public Builder clearIsDirectory() {
bitField0_ = (bitField0_ & ~0x00000002);
isDirectory_ = 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:yamcs.protobuf.cfdp.RemoteFile)
}
// @@protoc_insertion_point(class_scope:yamcs.protobuf.cfdp.RemoteFile)
private static final org.yamcs.protobuf.RemoteFile DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.yamcs.protobuf.RemoteFile();
}
public static org.yamcs.protobuf.RemoteFile getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RemoteFile parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RemoteFile(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 org.yamcs.protobuf.RemoteFile getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}