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

org.yamcs.protobuf.CreateInstanceRequest 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_service.proto

package org.yamcs.protobuf;

/**
 * Protobuf type {@code yamcs.protobuf.instances.CreateInstanceRequest}
 */
public final class CreateInstanceRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:yamcs.protobuf.instances.CreateInstanceRequest)
    CreateInstanceRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use CreateInstanceRequest.newBuilder() to construct.
  private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private CreateInstanceRequest() {
    name_ = "";
    template_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private CreateInstanceRequest(
      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_ |= 0x00000002;
            template_ = bs;
            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000004) != 0)) {
              templateArgs_ = com.google.protobuf.MapField.newMapField(
                  TemplateArgsDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000004;
            }
            com.google.protobuf.MapEntry
            templateArgs__ = input.readMessage(
                TemplateArgsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            templateArgs_.getMutableMap().put(
                templateArgs__.getKey(), templateArgs__.getValue());
            break;
          }
          case 34: {
            if (!((mutable_bitField0_ & 0x00000008) != 0)) {
              labels_ = com.google.protobuf.MapField.newMapField(
                  LabelsDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000008;
            }
            com.google.protobuf.MapEntry
            labels__ = input.readMessage(
                LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            labels_.getMutableMap().put(
                labels__.getKey(), labels__.getValue());
            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.InstancesServiceProto.internal_static_yamcs_protobuf_instances_CreateInstanceRequest_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 3:
        return internalGetTemplateArgs();
      case 4:
        return internalGetLabels();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.yamcs.protobuf.InstancesServiceProto.internal_static_yamcs_protobuf_instances_CreateInstanceRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.yamcs.protobuf.CreateInstanceRequest.class, org.yamcs.protobuf.CreateInstanceRequest.Builder.class);
  }

  private int bitField0_;
  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * 
   * **Required.** The name of the instance.
   * 
* * optional string name = 1; * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * **Required.** The name of the instance.
   * 
* * 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; } } /** *
   * **Required.** The name of the instance.
   * 
* * 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 TEMPLATE_FIELD_NUMBER = 2; private volatile java.lang.Object template_; /** *
   * **Required.** The name of the template for this instance.
   * 
* * optional string template = 2; * @return Whether the template field is set. */ @java.lang.Override public boolean hasTemplate() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * **Required.** The name of the template for this instance.
   * 
* * optional string template = 2; * @return The template. */ @java.lang.Override public java.lang.String getTemplate() { java.lang.Object ref = template_; 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()) { template_ = s; } return s; } } /** *
   * **Required.** The name of the template for this instance.
   * 
* * optional string template = 2; * @return The bytes for template. */ @java.lang.Override public com.google.protobuf.ByteString getTemplateBytes() { java.lang.Object ref = template_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); template_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TEMPLATEARGS_FIELD_NUMBER = 3; private static final class TemplateArgsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.yamcs.protobuf.InstancesServiceProto.internal_static_yamcs_protobuf_instances_CreateInstanceRequest_TemplateArgsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } private com.google.protobuf.MapField< java.lang.String, java.lang.String> templateArgs_; private com.google.protobuf.MapField internalGetTemplateArgs() { if (templateArgs_ == null) { return com.google.protobuf.MapField.emptyMapField( TemplateArgsDefaultEntryHolder.defaultEntry); } return templateArgs_; } public int getTemplateArgsCount() { return internalGetTemplateArgs().getMap().size(); } /** *
   * Arguments for substitution in the template definition. Each entry is
   * keyed by the argument name. The value must be a string.
   * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public boolean containsTemplateArgs( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTemplateArgs().getMap().containsKey(key); } /** * Use {@link #getTemplateArgsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTemplateArgs() { return getTemplateArgsMap(); } /** *
   * Arguments for substitution in the template definition. Each entry is
   * keyed by the argument name. The value must be a string.
   * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public java.util.Map getTemplateArgsMap() { return internalGetTemplateArgs().getMap(); } /** *
   * Arguments for substitution in the template definition. Each entry is
   * keyed by the argument name. The value must be a string.
   * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public java.lang.String getTemplateArgsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTemplateArgs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Arguments for substitution in the template definition. Each entry is
   * keyed by the argument name. The value must be a string.
   * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public java.lang.String getTemplateArgsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTemplateArgs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int LABELS_FIELD_NUMBER = 4; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.yamcs.protobuf.InstancesServiceProto.internal_static_yamcs_protobuf_instances_CreateInstanceRequest_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } private com.google.protobuf.MapField< java.lang.String, java.lang.String> labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField( LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** *
   * Labels assigned to this instance. Each entry is keyed by the tag name
   * of the label. The value represent the label value for that tag.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public boolean containsLabels( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** *
   * Labels assigned to this instance. Each entry is keyed by the tag name
   * of the label. The value represent the label value for that tag.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** *
   * Labels assigned to this instance. Each entry is keyed by the tag name
   * of the label. The value represent the label value for that tag.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Labels assigned to this instance. Each entry is keyed by the tag name
   * of the label. The value represent the label value for that tag.
   * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } 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_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, template_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetTemplateArgs(), TemplateArgsDefaultEntryHolder.defaultEntry, 3); com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); 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_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, template_); } for (java.util.Map.Entry entry : internalGetTemplateArgs().getMap().entrySet()) { com.google.protobuf.MapEntry templateArgs__ = TemplateArgsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, templateArgs__); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, labels__); } 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.CreateInstanceRequest)) { return super.equals(obj); } org.yamcs.protobuf.CreateInstanceRequest other = (org.yamcs.protobuf.CreateInstanceRequest) obj; if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName() .equals(other.getName())) return false; } if (hasTemplate() != other.hasTemplate()) return false; if (hasTemplate()) { if (!getTemplate() .equals(other.getTemplate())) return false; } if (!internalGetTemplateArgs().equals( other.internalGetTemplateArgs())) return false; if (!internalGetLabels().equals( other.internalGetLabels())) 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 (hasTemplate()) { hash = (37 * hash) + TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getTemplate().hashCode(); } if (!internalGetTemplateArgs().getMap().isEmpty()) { hash = (37 * hash) + TEMPLATEARGS_FIELD_NUMBER; hash = (53 * hash) + internalGetTemplateArgs().hashCode(); } if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.yamcs.protobuf.CreateInstanceRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.CreateInstanceRequest 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.CreateInstanceRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.CreateInstanceRequest 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.CreateInstanceRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.CreateInstanceRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.yamcs.protobuf.CreateInstanceRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.yamcs.protobuf.CreateInstanceRequest 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.CreateInstanceRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.yamcs.protobuf.CreateInstanceRequest 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.CreateInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.yamcs.protobuf.CreateInstanceRequest 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.CreateInstanceRequest 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.CreateInstanceRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yamcs.protobuf.instances.CreateInstanceRequest) org.yamcs.protobuf.CreateInstanceRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.yamcs.protobuf.InstancesServiceProto.internal_static_yamcs_protobuf_instances_CreateInstanceRequest_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: return internalGetTemplateArgs(); case 4: return internalGetLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 3: return internalGetMutableTemplateArgs(); case 4: return internalGetMutableLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.yamcs.protobuf.InstancesServiceProto.internal_static_yamcs_protobuf_instances_CreateInstanceRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( org.yamcs.protobuf.CreateInstanceRequest.class, org.yamcs.protobuf.CreateInstanceRequest.Builder.class); } // Construct using org.yamcs.protobuf.CreateInstanceRequest.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); template_ = ""; bitField0_ = (bitField0_ & ~0x00000002); internalGetMutableTemplateArgs().clear(); internalGetMutableLabels().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.yamcs.protobuf.InstancesServiceProto.internal_static_yamcs_protobuf_instances_CreateInstanceRequest_descriptor; } @java.lang.Override public org.yamcs.protobuf.CreateInstanceRequest getDefaultInstanceForType() { return org.yamcs.protobuf.CreateInstanceRequest.getDefaultInstance(); } @java.lang.Override public org.yamcs.protobuf.CreateInstanceRequest build() { org.yamcs.protobuf.CreateInstanceRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.yamcs.protobuf.CreateInstanceRequest buildPartial() { org.yamcs.protobuf.CreateInstanceRequest result = new org.yamcs.protobuf.CreateInstanceRequest(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.template_ = template_; result.templateArgs_ = internalGetTemplateArgs(); result.templateArgs_.makeImmutable(); result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); 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.CreateInstanceRequest) { return mergeFrom((org.yamcs.protobuf.CreateInstanceRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.yamcs.protobuf.CreateInstanceRequest other) { if (other == org.yamcs.protobuf.CreateInstanceRequest.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasTemplate()) { bitField0_ |= 0x00000002; template_ = other.template_; onChanged(); } internalGetMutableTemplateArgs().mergeFrom( other.internalGetTemplateArgs()); internalGetMutableLabels().mergeFrom( other.internalGetLabels()); 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.CreateInstanceRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.yamcs.protobuf.CreateInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
     * **Required.** The name of the instance.
     * 
* * optional string name = 1; * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * **Required.** The name of the instance.
     * 
* * 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; } } /** *
     * **Required.** The name of the instance.
     * 
* * 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; } } /** *
     * **Required.** The name of the instance.
     * 
* * 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; } /** *
     * **Required.** The name of the instance.
     * 
* * optional string name = 1; * @return This builder for chaining. */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * **Required.** The name of the instance.
     * 
* * 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 template_ = ""; /** *
     * **Required.** The name of the template for this instance.
     * 
* * optional string template = 2; * @return Whether the template field is set. */ public boolean hasTemplate() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * **Required.** The name of the template for this instance.
     * 
* * optional string template = 2; * @return The template. */ public java.lang.String getTemplate() { java.lang.Object ref = template_; 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()) { template_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * **Required.** The name of the template for this instance.
     * 
* * optional string template = 2; * @return The bytes for template. */ public com.google.protobuf.ByteString getTemplateBytes() { java.lang.Object ref = template_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); template_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * **Required.** The name of the template for this instance.
     * 
* * optional string template = 2; * @param value The template to set. * @return This builder for chaining. */ public Builder setTemplate( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; template_ = value; onChanged(); return this; } /** *
     * **Required.** The name of the template for this instance.
     * 
* * optional string template = 2; * @return This builder for chaining. */ public Builder clearTemplate() { bitField0_ = (bitField0_ & ~0x00000002); template_ = getDefaultInstance().getTemplate(); onChanged(); return this; } /** *
     * **Required.** The name of the template for this instance.
     * 
* * optional string template = 2; * @param value The bytes for template to set. * @return This builder for chaining. */ public Builder setTemplateBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; template_ = value; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> templateArgs_; private com.google.protobuf.MapField internalGetTemplateArgs() { if (templateArgs_ == null) { return com.google.protobuf.MapField.emptyMapField( TemplateArgsDefaultEntryHolder.defaultEntry); } return templateArgs_; } private com.google.protobuf.MapField internalGetMutableTemplateArgs() { onChanged();; if (templateArgs_ == null) { templateArgs_ = com.google.protobuf.MapField.newMapField( TemplateArgsDefaultEntryHolder.defaultEntry); } if (!templateArgs_.isMutable()) { templateArgs_ = templateArgs_.copy(); } return templateArgs_; } public int getTemplateArgsCount() { return internalGetTemplateArgs().getMap().size(); } /** *
     * Arguments for substitution in the template definition. Each entry is
     * keyed by the argument name. The value must be a string.
     * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public boolean containsTemplateArgs( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTemplateArgs().getMap().containsKey(key); } /** * Use {@link #getTemplateArgsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTemplateArgs() { return getTemplateArgsMap(); } /** *
     * Arguments for substitution in the template definition. Each entry is
     * keyed by the argument name. The value must be a string.
     * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public java.util.Map getTemplateArgsMap() { return internalGetTemplateArgs().getMap(); } /** *
     * Arguments for substitution in the template definition. Each entry is
     * keyed by the argument name. The value must be a string.
     * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public java.lang.String getTemplateArgsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTemplateArgs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Arguments for substitution in the template definition. Each entry is
     * keyed by the argument name. The value must be a string.
     * 
* * map<string, string> templateArgs = 3; */ @java.lang.Override public java.lang.String getTemplateArgsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTemplateArgs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearTemplateArgs() { internalGetMutableTemplateArgs().getMutableMap() .clear(); return this; } /** *
     * Arguments for substitution in the template definition. Each entry is
     * keyed by the argument name. The value must be a string.
     * 
* * map<string, string> templateArgs = 3; */ public Builder removeTemplateArgs( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableTemplateArgs().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableTemplateArgs() { return internalGetMutableTemplateArgs().getMutableMap(); } /** *
     * Arguments for substitution in the template definition. Each entry is
     * keyed by the argument name. The value must be a string.
     * 
* * map<string, string> templateArgs = 3; */ public Builder putTemplateArgs( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableTemplateArgs().getMutableMap() .put(key, value); return this; } /** *
     * Arguments for substitution in the template definition. Each entry is
     * keyed by the argument name. The value must be a string.
     * 
* * map<string, string> templateArgs = 3; */ public Builder putAllTemplateArgs( java.util.Map values) { internalGetMutableTemplateArgs().getMutableMap() .putAll(values); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField( LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { onChanged();; if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField( LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** *
     * Labels assigned to this instance. Each entry is keyed by the tag name
     * of the label. The value represent the label value for that tag.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public boolean containsLabels( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** *
     * Labels assigned to this instance. Each entry is keyed by the tag name
     * of the label. The value represent the label value for that tag.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** *
     * Labels assigned to this instance. Each entry is keyed by the tag name
     * of the label. The value represent the label value for that tag.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Labels assigned to this instance. Each entry is keyed by the tag name
     * of the label. The value represent the label value for that tag.
     * 
* * map<string, string> labels = 4; */ @java.lang.Override public java.lang.String getLabelsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { internalGetMutableLabels().getMutableMap() .clear(); return this; } /** *
     * Labels assigned to this instance. Each entry is keyed by the tag name
     * of the label. The value represent the label value for that tag.
     * 
* * map<string, string> labels = 4; */ public Builder removeLabels( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableLabels().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { return internalGetMutableLabels().getMutableMap(); } /** *
     * Labels assigned to this instance. Each entry is keyed by the tag name
     * of the label. The value represent the label value for that tag.
     * 
* * map<string, string> labels = 4; */ public Builder putLabels( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap() .put(key, value); return this; } /** *
     * Labels assigned to this instance. Each entry is keyed by the tag name
     * of the label. The value represent the label value for that tag.
     * 
* * map<string, string> labels = 4; */ public Builder putAllLabels( java.util.Map values) { internalGetMutableLabels().getMutableMap() .putAll(values); 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.CreateInstanceRequest) } // @@protoc_insertion_point(class_scope:yamcs.protobuf.instances.CreateInstanceRequest) private static final org.yamcs.protobuf.CreateInstanceRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.yamcs.protobuf.CreateInstanceRequest(); } public static org.yamcs.protobuf.CreateInstanceRequest getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CreateInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CreateInstanceRequest(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.CreateInstanceRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy