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

org.yamcs.protobuf.TemplateVariable Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: yamcs/protobuf/instances/instances.proto

package org.yamcs.protobuf;

/**
 * Protobuf type {@code yamcs.protobuf.instances.TemplateVariable}
 */
public final class TemplateVariable extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:yamcs.protobuf.instances.TemplateVariable)
    TemplateVariableOrBuilder {
private static final long serialVersionUID = 0L;
  // Use TemplateVariable.newBuilder() to construct.
  private TemplateVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private TemplateVariable() {
    name_ = "";
    label_ = "";
    type_ = "";
    help_ = "";
    choices_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    initial_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new TemplateVariable();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private TemplateVariable(
      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;
            name_ = bs;
            break;
          }
          case 18: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000008;
            help_ = bs;
            break;
          }
          case 24: {
            bitField0_ |= 0x00000010;
            required_ = input.readBool();
            break;
          }
          case 34: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000004;
            type_ = bs;
            break;
          }
          case 42: {
            com.google.protobuf.ByteString bs = input.readBytes();
            if (!((mutable_bitField0_ & 0x00000020) != 0)) {
              choices_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000020;
            }
            choices_.add(bs);
            break;
          }
          case 50: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000002;
            label_ = bs;
            break;
          }
          case 58: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000020;
            initial_ = bs;
            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 {
      if (((mutable_bitField0_ & 0x00000020) != 0)) {
        choices_ = choices_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.yamcs.protobuf.InstancesProto.internal_static_yamcs_protobuf_instances_TemplateVariable_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.yamcs.protobuf.InstancesProto.internal_static_yamcs_protobuf_instances_TemplateVariable_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.yamcs.protobuf.TemplateVariable.class, org.yamcs.protobuf.TemplateVariable.Builder.class);
  }

  private int bitField0_;
  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * 
   * Variable name. 
   * 
* * optional string name = 1; * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Variable name. 
   * 
* * optional string name = 1; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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()) { name_ = s; } return s; } } /** *
   * Variable name. 
   * 
* * optional string name = 1; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_FIELD_NUMBER = 6; private volatile java.lang.Object label_; /** *
   * Verbose name for use in UI forms
   * 
* * optional string label = 6; * @return Whether the label field is set. */ @java.lang.Override public boolean hasLabel() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * Verbose name for use in UI forms
   * 
* * optional string label = 6; * @return The label. */ @java.lang.Override public java.lang.String getLabel() { java.lang.Object ref = label_; 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()) { label_ = s; } return s; } } /** *
   * Verbose name for use in UI forms
   * 
* * optional string label = 6; * @return The bytes for label. */ @java.lang.Override public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 4; private volatile java.lang.Object type_; /** *
   * Type of variable (Java class extending org.yamcs.templating.Variable)
   * 
* * optional string type = 4; * @return Whether the type field is set. */ @java.lang.Override public boolean hasType() { return ((bitField0_ & 0x00000004) != 0); } /** *
   * Type of variable (Java class extending org.yamcs.templating.Variable)
   * 
* * optional string type = 4; * @return The type. */ @java.lang.Override public java.lang.String getType() { java.lang.Object ref = type_; 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()) { type_ = s; } return s; } } /** *
   * Type of variable (Java class extending org.yamcs.templating.Variable)
   * 
* * optional string type = 4; * @return The bytes for type. */ @java.lang.Override public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int HELP_FIELD_NUMBER = 2; private volatile java.lang.Object help_; /** *
   * Verbose user guidance (HTML)
   * 
* * optional string help = 2; * @return Whether the help field is set. */ @java.lang.Override public boolean hasHelp() { return ((bitField0_ & 0x00000008) != 0); } /** *
   * Verbose user guidance (HTML)
   * 
* * optional string help = 2; * @return The help. */ @java.lang.Override public java.lang.String getHelp() { java.lang.Object ref = help_; 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()) { help_ = s; } return s; } } /** *
   * Verbose user guidance (HTML)
   * 
* * optional string help = 2; * @return The bytes for help. */ @java.lang.Override public com.google.protobuf.ByteString getHelpBytes() { java.lang.Object ref = help_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); help_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REQUIRED_FIELD_NUMBER = 3; private boolean required_; /** *
   * Whether this variable is required input
   * 
* * optional bool required = 3; * @return Whether the required field is set. */ @java.lang.Override public boolean hasRequired() { return ((bitField0_ & 0x00000010) != 0); } /** *
   * Whether this variable is required input
   * 
* * optional bool required = 3; * @return The required. */ @java.lang.Override public boolean getRequired() { return required_; } public static final int CHOICES_FIELD_NUMBER = 5; private com.google.protobuf.LazyStringList choices_; /** *
   * List of valid choices
   * 
* * repeated string choices = 5; * @return A list containing the choices. */ public com.google.protobuf.ProtocolStringList getChoicesList() { return choices_; } /** *
   * List of valid choices
   * 
* * repeated string choices = 5; * @return The count of choices. */ public int getChoicesCount() { return choices_.size(); } /** *
   * List of valid choices
   * 
* * repeated string choices = 5; * @param index The index of the element to return. * @return The choices at the given index. */ public java.lang.String getChoices(int index) { return choices_.get(index); } /** *
   * List of valid choices
   * 
* * repeated string choices = 5; * @param index The index of the value to return. * @return The bytes of the choices at the given index. */ public com.google.protobuf.ByteString getChoicesBytes(int index) { return choices_.getByteString(index); } public static final int INITIAL_FIELD_NUMBER = 7; private volatile java.lang.Object initial_; /** *
   * Initial value for use in UI forms
   * 
* * optional string initial = 7; * @return Whether the initial field is set. */ @java.lang.Override public boolean hasInitial() { return ((bitField0_ & 0x00000020) != 0); } /** *
   * Initial value for use in UI forms
   * 
* * optional string initial = 7; * @return The initial. */ @java.lang.Override public java.lang.String getInitial() { java.lang.Object ref = initial_; 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()) { initial_ = s; } return s; } } /** *
   * Initial value for use in UI forms
   * 
* * optional string initial = 7; * @return The bytes for initial. */ @java.lang.Override public com.google.protobuf.ByteString getInitialBytes() { java.lang.Object ref = initial_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); initial_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, help_); } if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(3, required_); } if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); } for (int i = 0; i < choices_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, choices_.getRaw(i)); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, label_); } if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, initial_); } 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, name_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, help_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, required_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); } { int dataSize = 0; for (int i = 0; i < choices_.size(); i++) { dataSize += computeStringSizeNoTag(choices_.getRaw(i)); } size += dataSize; size += 1 * getChoicesList().size(); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, label_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, initial_); } 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.TemplateVariable)) { return super.equals(obj); } org.yamcs.protobuf.TemplateVariable other = (org.yamcs.protobuf.TemplateVariable) obj; if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName() .equals(other.getName())) return false; } if (hasLabel() != other.hasLabel()) return false; if (hasLabel()) { if (!getLabel() .equals(other.getLabel())) return false; } if (hasType() != other.hasType()) return false; if (hasType()) { if (!getType() .equals(other.getType())) return false; } if (hasHelp() != other.hasHelp()) return false; if (hasHelp()) { if (!getHelp() .equals(other.getHelp())) return false; } if (hasRequired() != other.hasRequired()) return false; if (hasRequired()) { if (getRequired() != other.getRequired()) return false; } if (!getChoicesList() .equals(other.getChoicesList())) return false; if (hasInitial() != other.hasInitial()) return false; if (hasInitial()) { if (!getInitial() .equals(other.getInitial())) 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 (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasLabel()) { hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); } if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } if (hasHelp()) { hash = (37 * hash) + HELP_FIELD_NUMBER; hash = (53 * hash) + getHelp().hashCode(); } if (hasRequired()) { hash = (37 * hash) + REQUIRED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getRequired()); } if (getChoicesCount() > 0) { hash = (37 * hash) + CHOICES_FIELD_NUMBER; hash = (53 * hash) + getChoicesList().hashCode(); } if (hasInitial()) { hash = (37 * hash) + INITIAL_FIELD_NUMBER; hash = (53 * hash) + getInitial().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.yamcs.protobuf.TemplateVariable parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.TemplateVariable 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.TemplateVariable parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.TemplateVariable 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.TemplateVariable parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.TemplateVariable parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.yamcs.protobuf.TemplateVariable parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.yamcs.protobuf.TemplateVariable 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.TemplateVariable parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.yamcs.protobuf.TemplateVariable 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.TemplateVariable parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.yamcs.protobuf.TemplateVariable 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.TemplateVariable 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.instances.TemplateVariable} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yamcs.protobuf.instances.TemplateVariable) org.yamcs.protobuf.TemplateVariableOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.yamcs.protobuf.InstancesProto.internal_static_yamcs_protobuf_instances_TemplateVariable_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.yamcs.protobuf.InstancesProto.internal_static_yamcs_protobuf_instances_TemplateVariable_fieldAccessorTable .ensureFieldAccessorsInitialized( org.yamcs.protobuf.TemplateVariable.class, org.yamcs.protobuf.TemplateVariable.Builder.class); } // Construct using org.yamcs.protobuf.TemplateVariable.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(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); label_ = ""; bitField0_ = (bitField0_ & ~0x00000002); type_ = ""; bitField0_ = (bitField0_ & ~0x00000004); help_ = ""; bitField0_ = (bitField0_ & ~0x00000008); required_ = false; bitField0_ = (bitField0_ & ~0x00000010); choices_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); initial_ = ""; bitField0_ = (bitField0_ & ~0x00000040); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.yamcs.protobuf.InstancesProto.internal_static_yamcs_protobuf_instances_TemplateVariable_descriptor; } @java.lang.Override public org.yamcs.protobuf.TemplateVariable getDefaultInstanceForType() { return org.yamcs.protobuf.TemplateVariable.getDefaultInstance(); } @java.lang.Override public org.yamcs.protobuf.TemplateVariable build() { org.yamcs.protobuf.TemplateVariable result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.yamcs.protobuf.TemplateVariable buildPartial() { org.yamcs.protobuf.TemplateVariable result = new org.yamcs.protobuf.TemplateVariable(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } result.name_ = name_; if (((from_bitField0_ & 0x00000002) != 0)) { to_bitField0_ |= 0x00000002; } result.label_ = label_; if (((from_bitField0_ & 0x00000004) != 0)) { to_bitField0_ |= 0x00000004; } result.type_ = type_; if (((from_bitField0_ & 0x00000008) != 0)) { to_bitField0_ |= 0x00000008; } result.help_ = help_; if (((from_bitField0_ & 0x00000010) != 0)) { result.required_ = required_; to_bitField0_ |= 0x00000010; } if (((bitField0_ & 0x00000020) != 0)) { choices_ = choices_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000020); } result.choices_ = choices_; if (((from_bitField0_ & 0x00000040) != 0)) { to_bitField0_ |= 0x00000020; } result.initial_ = initial_; 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.TemplateVariable) { return mergeFrom((org.yamcs.protobuf.TemplateVariable)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.yamcs.protobuf.TemplateVariable other) { if (other == org.yamcs.protobuf.TemplateVariable.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasLabel()) { bitField0_ |= 0x00000002; label_ = other.label_; onChanged(); } if (other.hasType()) { bitField0_ |= 0x00000004; type_ = other.type_; onChanged(); } if (other.hasHelp()) { bitField0_ |= 0x00000008; help_ = other.help_; onChanged(); } if (other.hasRequired()) { setRequired(other.getRequired()); } if (!other.choices_.isEmpty()) { if (choices_.isEmpty()) { choices_ = other.choices_; bitField0_ = (bitField0_ & ~0x00000020); } else { ensureChoicesIsMutable(); choices_.addAll(other.choices_); } onChanged(); } if (other.hasInitial()) { bitField0_ |= 0x00000040; initial_ = other.initial_; onChanged(); } 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 { org.yamcs.protobuf.TemplateVariable parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.yamcs.protobuf.TemplateVariable) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
     * Variable name. 
     * 
* * optional string name = 1; * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * Variable name. 
     * 
* * optional string name = 1; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; 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()) { name_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Variable name. 
     * 
* * optional string name = 1; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Variable name. 
     * 
* * optional string name = 1; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } /** *
     * Variable name. 
     * 
* * optional string name = 1; * @return This builder for chaining. */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * Variable name. 
     * 
* * optional string name = 1; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } private java.lang.Object label_ = ""; /** *
     * Verbose name for use in UI forms
     * 
* * optional string label = 6; * @return Whether the label field is set. */ public boolean hasLabel() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * Verbose name for use in UI forms
     * 
* * optional string label = 6; * @return The label. */ public java.lang.String getLabel() { java.lang.Object ref = label_; 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()) { label_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Verbose name for use in UI forms
     * 
* * optional string label = 6; * @return The bytes for label. */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Verbose name for use in UI forms
     * 
* * optional string label = 6; * @param value The label to set. * @return This builder for chaining. */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; label_ = value; onChanged(); return this; } /** *
     * Verbose name for use in UI forms
     * 
* * optional string label = 6; * @return This builder for chaining. */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000002); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** *
     * Verbose name for use in UI forms
     * 
* * optional string label = 6; * @param value The bytes for label to set. * @return This builder for chaining. */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; label_ = value; onChanged(); return this; } private java.lang.Object type_ = ""; /** *
     * Type of variable (Java class extending org.yamcs.templating.Variable)
     * 
* * optional string type = 4; * @return Whether the type field is set. */ public boolean hasType() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * Type of variable (Java class extending org.yamcs.templating.Variable)
     * 
* * optional string type = 4; * @return The type. */ public java.lang.String getType() { java.lang.Object ref = type_; 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()) { type_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Type of variable (Java class extending org.yamcs.templating.Variable)
     * 
* * optional string type = 4; * @return The bytes for type. */ public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Type of variable (Java class extending org.yamcs.templating.Variable)
     * 
* * optional string type = 4; * @param value The type to set. * @return This builder for chaining. */ public Builder setType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; type_ = value; onChanged(); return this; } /** *
     * Type of variable (Java class extending org.yamcs.templating.Variable)
     * 
* * optional string type = 4; * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000004); type_ = getDefaultInstance().getType(); onChanged(); return this; } /** *
     * Type of variable (Java class extending org.yamcs.templating.Variable)
     * 
* * optional string type = 4; * @param value The bytes for type to set. * @return This builder for chaining. */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; type_ = value; onChanged(); return this; } private java.lang.Object help_ = ""; /** *
     * Verbose user guidance (HTML)
     * 
* * optional string help = 2; * @return Whether the help field is set. */ public boolean hasHelp() { return ((bitField0_ & 0x00000008) != 0); } /** *
     * Verbose user guidance (HTML)
     * 
* * optional string help = 2; * @return The help. */ public java.lang.String getHelp() { java.lang.Object ref = help_; 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()) { help_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Verbose user guidance (HTML)
     * 
* * optional string help = 2; * @return The bytes for help. */ public com.google.protobuf.ByteString getHelpBytes() { java.lang.Object ref = help_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); help_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Verbose user guidance (HTML)
     * 
* * optional string help = 2; * @param value The help to set. * @return This builder for chaining. */ public Builder setHelp( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; help_ = value; onChanged(); return this; } /** *
     * Verbose user guidance (HTML)
     * 
* * optional string help = 2; * @return This builder for chaining. */ public Builder clearHelp() { bitField0_ = (bitField0_ & ~0x00000008); help_ = getDefaultInstance().getHelp(); onChanged(); return this; } /** *
     * Verbose user guidance (HTML)
     * 
* * optional string help = 2; * @param value The bytes for help to set. * @return This builder for chaining. */ public Builder setHelpBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; help_ = value; onChanged(); return this; } private boolean required_ ; /** *
     * Whether this variable is required input
     * 
* * optional bool required = 3; * @return Whether the required field is set. */ @java.lang.Override public boolean hasRequired() { return ((bitField0_ & 0x00000010) != 0); } /** *
     * Whether this variable is required input
     * 
* * optional bool required = 3; * @return The required. */ @java.lang.Override public boolean getRequired() { return required_; } /** *
     * Whether this variable is required input
     * 
* * optional bool required = 3; * @param value The required to set. * @return This builder for chaining. */ public Builder setRequired(boolean value) { bitField0_ |= 0x00000010; required_ = value; onChanged(); return this; } /** *
     * Whether this variable is required input
     * 
* * optional bool required = 3; * @return This builder for chaining. */ public Builder clearRequired() { bitField0_ = (bitField0_ & ~0x00000010); required_ = false; onChanged(); return this; } private com.google.protobuf.LazyStringList choices_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureChoicesIsMutable() { if (!((bitField0_ & 0x00000020) != 0)) { choices_ = new com.google.protobuf.LazyStringArrayList(choices_); bitField0_ |= 0x00000020; } } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @return A list containing the choices. */ public com.google.protobuf.ProtocolStringList getChoicesList() { return choices_.getUnmodifiableView(); } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @return The count of choices. */ public int getChoicesCount() { return choices_.size(); } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @param index The index of the element to return. * @return The choices at the given index. */ public java.lang.String getChoices(int index) { return choices_.get(index); } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @param index The index of the value to return. * @return The bytes of the choices at the given index. */ public com.google.protobuf.ByteString getChoicesBytes(int index) { return choices_.getByteString(index); } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @param index The index to set the value at. * @param value The choices to set. * @return This builder for chaining. */ public Builder setChoices( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureChoicesIsMutable(); choices_.set(index, value); onChanged(); return this; } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @param value The choices to add. * @return This builder for chaining. */ public Builder addChoices( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureChoicesIsMutable(); choices_.add(value); onChanged(); return this; } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @param values The choices to add. * @return This builder for chaining. */ public Builder addAllChoices( java.lang.Iterable values) { ensureChoicesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, choices_); onChanged(); return this; } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @return This builder for chaining. */ public Builder clearChoices() { choices_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** *
     * List of valid choices
     * 
* * repeated string choices = 5; * @param value The bytes of the choices to add. * @return This builder for chaining. */ public Builder addChoicesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureChoicesIsMutable(); choices_.add(value); onChanged(); return this; } private java.lang.Object initial_ = ""; /** *
     * Initial value for use in UI forms
     * 
* * optional string initial = 7; * @return Whether the initial field is set. */ public boolean hasInitial() { return ((bitField0_ & 0x00000040) != 0); } /** *
     * Initial value for use in UI forms
     * 
* * optional string initial = 7; * @return The initial. */ public java.lang.String getInitial() { java.lang.Object ref = initial_; 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()) { initial_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Initial value for use in UI forms
     * 
* * optional string initial = 7; * @return The bytes for initial. */ public com.google.protobuf.ByteString getInitialBytes() { java.lang.Object ref = initial_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); initial_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Initial value for use in UI forms
     * 
* * optional string initial = 7; * @param value The initial to set. * @return This builder for chaining. */ public Builder setInitial( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; initial_ = value; onChanged(); return this; } /** *
     * Initial value for use in UI forms
     * 
* * optional string initial = 7; * @return This builder for chaining. */ public Builder clearInitial() { bitField0_ = (bitField0_ & ~0x00000040); initial_ = getDefaultInstance().getInitial(); onChanged(); return this; } /** *
     * Initial value for use in UI forms
     * 
* * optional string initial = 7; * @param value The bytes for initial to set. * @return This builder for chaining. */ public Builder setInitialBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; initial_ = value; 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.instances.TemplateVariable) } // @@protoc_insertion_point(class_scope:yamcs.protobuf.instances.TemplateVariable) private static final org.yamcs.protobuf.TemplateVariable DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.yamcs.protobuf.TemplateVariable(); } public static org.yamcs.protobuf.TemplateVariable getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TemplateVariable parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TemplateVariable(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.TemplateVariable getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy