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

io.stigg.sidecar.proto.v1.EntitlementFeature Maven / Gradle / Ivy

There is a newer version: 2.186.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: stigg/sidecar/v1/sidecar.proto

package io.stigg.sidecar.proto.v1;

/** Protobuf type {@code stigg.sidecar.v1.EntitlementFeature} */
public final class EntitlementFeature extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:stigg.sidecar.v1.EntitlementFeature)
    EntitlementFeatureOrBuilder {
  private static final long serialVersionUID = 0L;

  // Use EntitlementFeature.newBuilder() to construct.
  private EntitlementFeature(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }

  private EntitlementFeature() {
    id_ = "";
    featureType_ = 0;
    units_ = "";
    unitsPlural_ = "";
    meterType_ = 0;
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return io.stigg.sidecar.proto.v1.SidecarProto
        .internal_static_stigg_sidecar_v1_EntitlementFeature_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.stigg.sidecar.proto.v1.SidecarProto
        .internal_static_stigg_sidecar_v1_EntitlementFeature_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.stigg.sidecar.proto.v1.EntitlementFeature.class,
            io.stigg.sidecar.proto.v1.EntitlementFeature.Builder.class);
  }

  private int bitField0_;
  public static final int ID_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object id_ = "";

  /**
   * string id = 1 [json_name = "id"];
   *
   * @return The id.
   */
  @java.lang.Override
  public java.lang.String getId() {
    java.lang.Object ref = id_;
    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();
      id_ = s;
      return s;
    }
  }

  /**
   * string id = 1 [json_name = "id"];
   *
   * @return The bytes for id.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getIdBytes() {
    java.lang.Object ref = id_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      id_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FEATURE_TYPE_FIELD_NUMBER = 2;
  private int featureType_ = 0;

  /**
   * .stigg.sidecar.v1.FeatureType feature_type = 2 [json_name = "featureType"];
   *
   * @return The enum numeric value on the wire for featureType.
   */
  @java.lang.Override
  public int getFeatureTypeValue() {
    return featureType_;
  }

  /**
   * .stigg.sidecar.v1.FeatureType feature_type = 2 [json_name = "featureType"];
   *
   * @return The featureType.
   */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.FeatureType getFeatureType() {
    io.stigg.sidecar.proto.v1.FeatureType result =
        io.stigg.sidecar.proto.v1.FeatureType.forNumber(featureType_);
    return result == null ? io.stigg.sidecar.proto.v1.FeatureType.UNRECOGNIZED : result;
  }

  public static final int UNITS_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object units_ = "";

  /**
   * optional string units = 3 [json_name = "units"];
   *
   * @return Whether the units field is set.
   */
  @java.lang.Override
  public boolean hasUnits() {
    return ((bitField0_ & 0x00000001) != 0);
  }

  /**
   * optional string units = 3 [json_name = "units"];
   *
   * @return The units.
   */
  @java.lang.Override
  public java.lang.String getUnits() {
    java.lang.Object ref = units_;
    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();
      units_ = s;
      return s;
    }
  }

  /**
   * optional string units = 3 [json_name = "units"];
   *
   * @return The bytes for units.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUnitsBytes() {
    java.lang.Object ref = units_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      units_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int UNITS_PLURAL_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object unitsPlural_ = "";

  /**
   * optional string units_plural = 4 [json_name = "unitsPlural"];
   *
   * @return Whether the unitsPlural field is set.
   */
  @java.lang.Override
  public boolean hasUnitsPlural() {
    return ((bitField0_ & 0x00000002) != 0);
  }

  /**
   * optional string units_plural = 4 [json_name = "unitsPlural"];
   *
   * @return The unitsPlural.
   */
  @java.lang.Override
  public java.lang.String getUnitsPlural() {
    java.lang.Object ref = unitsPlural_;
    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();
      unitsPlural_ = s;
      return s;
    }
  }

  /**
   * optional string units_plural = 4 [json_name = "unitsPlural"];
   *
   * @return The bytes for unitsPlural.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUnitsPluralBytes() {
    java.lang.Object ref = unitsPlural_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      unitsPlural_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int METER_TYPE_FIELD_NUMBER = 5;
  private int meterType_ = 0;

  /**
   * .stigg.sidecar.v1.MeterType meter_type = 5 [json_name = "meterType"];
   *
   * @return The enum numeric value on the wire for meterType.
   */
  @java.lang.Override
  public int getMeterTypeValue() {
    return meterType_;
  }

  /**
   * .stigg.sidecar.v1.MeterType meter_type = 5 [json_name = "meterType"];
   *
   * @return The meterType.
   */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.MeterType getMeterType() {
    io.stigg.sidecar.proto.v1.MeterType result =
        io.stigg.sidecar.proto.v1.MeterType.forNumber(meterType_);
    return result == null ? io.stigg.sidecar.proto.v1.MeterType.UNRECOGNIZED : result;
  }

  public static final int IS_METERED_FIELD_NUMBER = 6;
  private boolean isMetered_ = false;

  /**
   * bool is_metered = 6 [json_name = "isMetered"];
   *
   * @return The isMetered.
   */
  @java.lang.Override
  public boolean getIsMetered() {
    return isMetered_;
  }

  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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
    }
    if (featureType_
        != io.stigg.sidecar.proto.v1.FeatureType.FEATURE_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(2, featureType_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, units_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, unitsPlural_);
    }
    if (meterType_ != io.stigg.sidecar.proto.v1.MeterType.METER_TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(5, meterType_);
    }
    if (isMetered_ != false) {
      output.writeBool(6, isMetered_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
    }
    if (featureType_
        != io.stigg.sidecar.proto.v1.FeatureType.FEATURE_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, featureType_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, units_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, unitsPlural_);
    }
    if (meterType_ != io.stigg.sidecar.proto.v1.MeterType.METER_TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, meterType_);
    }
    if (isMetered_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, isMetered_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof io.stigg.sidecar.proto.v1.EntitlementFeature)) {
      return super.equals(obj);
    }
    io.stigg.sidecar.proto.v1.EntitlementFeature other =
        (io.stigg.sidecar.proto.v1.EntitlementFeature) obj;

    if (!getId().equals(other.getId())) return false;
    if (featureType_ != other.featureType_) return false;
    if (hasUnits() != other.hasUnits()) return false;
    if (hasUnits()) {
      if (!getUnits().equals(other.getUnits())) return false;
    }
    if (hasUnitsPlural() != other.hasUnitsPlural()) return false;
    if (hasUnitsPlural()) {
      if (!getUnitsPlural().equals(other.getUnitsPlural())) return false;
    }
    if (meterType_ != other.meterType_) return false;
    if (getIsMetered() != other.getIsMetered()) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + ID_FIELD_NUMBER;
    hash = (53 * hash) + getId().hashCode();
    hash = (37 * hash) + FEATURE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + featureType_;
    if (hasUnits()) {
      hash = (37 * hash) + UNITS_FIELD_NUMBER;
      hash = (53 * hash) + getUnits().hashCode();
    }
    if (hasUnitsPlural()) {
      hash = (37 * hash) + UNITS_PLURAL_FIELD_NUMBER;
      hash = (53 * hash) + getUnitsPlural().hashCode();
    }
    hash = (37 * hash) + METER_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + meterType_;
    hash = (37 * hash) + IS_METERED_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsMetered());
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature 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 io.stigg.sidecar.proto.v1.EntitlementFeature parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature 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 io.stigg.sidecar.proto.v1.EntitlementFeature parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature 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(io.stigg.sidecar.proto.v1.EntitlementFeature 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 stigg.sidecar.v1.EntitlementFeature} */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
      implements
      // @@protoc_insertion_point(builder_implements:stigg.sidecar.v1.EntitlementFeature)
      io.stigg.sidecar.proto.v1.EntitlementFeatureOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return io.stigg.sidecar.proto.v1.SidecarProto
          .internal_static_stigg_sidecar_v1_EntitlementFeature_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.stigg.sidecar.proto.v1.SidecarProto
          .internal_static_stigg_sidecar_v1_EntitlementFeature_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.stigg.sidecar.proto.v1.EntitlementFeature.class,
              io.stigg.sidecar.proto.v1.EntitlementFeature.Builder.class);
    }

    // Construct using io.stigg.sidecar.proto.v1.EntitlementFeature.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      id_ = "";
      featureType_ = 0;
      units_ = "";
      unitsPlural_ = "";
      meterType_ = 0;
      isMetered_ = false;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return io.stigg.sidecar.proto.v1.SidecarProto
          .internal_static_stigg_sidecar_v1_EntitlementFeature_descriptor;
    }

    @java.lang.Override
    public io.stigg.sidecar.proto.v1.EntitlementFeature getDefaultInstanceForType() {
      return io.stigg.sidecar.proto.v1.EntitlementFeature.getDefaultInstance();
    }

    @java.lang.Override
    public io.stigg.sidecar.proto.v1.EntitlementFeature build() {
      io.stigg.sidecar.proto.v1.EntitlementFeature result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.stigg.sidecar.proto.v1.EntitlementFeature buildPartial() {
      io.stigg.sidecar.proto.v1.EntitlementFeature result =
          new io.stigg.sidecar.proto.v1.EntitlementFeature(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(io.stigg.sidecar.proto.v1.EntitlementFeature result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.id_ = id_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.featureType_ = featureType_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.units_ = units_;
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.unitsPlural_ = unitsPlural_;
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.meterType_ = meterType_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.isMetered_ = isMetered_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @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 io.stigg.sidecar.proto.v1.EntitlementFeature) {
        return mergeFrom((io.stigg.sidecar.proto.v1.EntitlementFeature) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.stigg.sidecar.proto.v1.EntitlementFeature other) {
      if (other == io.stigg.sidecar.proto.v1.EntitlementFeature.getDefaultInstance()) return this;
      if (!other.getId().isEmpty()) {
        id_ = other.id_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.featureType_ != 0) {
        setFeatureTypeValue(other.getFeatureTypeValue());
      }
      if (other.hasUnits()) {
        units_ = other.units_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (other.hasUnitsPlural()) {
        unitsPlural_ = other.unitsPlural_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (other.meterType_ != 0) {
        setMeterTypeValue(other.getMeterTypeValue());
      }
      if (other.getIsMetered() != false) {
        setIsMetered(other.getIsMetered());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      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 {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                id_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 16:
              {
                featureType_ = input.readEnum();
                bitField0_ |= 0x00000002;
                break;
              } // case 16
            case 26:
              {
                units_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                unitsPlural_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 40:
              {
                meterType_ = input.readEnum();
                bitField0_ |= 0x00000010;
                break;
              } // case 40
            case 48:
              {
                isMetered_ = input.readBool();
                bitField0_ |= 0x00000020;
                break;
              } // case 48
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object id_ = "";

    /**
     * string id = 1 [json_name = "id"];
     *
     * @return The id.
     */
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        id_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     * string id = 1 [json_name = "id"];
     *
     * @return The bytes for id.
     */
    public com.google.protobuf.ByteString getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * string id = 1 [json_name = "id"];
     *
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      id_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    /**
     * string id = 1 [json_name = "id"];
     *
     * @return This builder for chaining.
     */
    public Builder clearId() {
      id_ = getDefaultInstance().getId();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }

    /**
     * string id = 1 [json_name = "id"];
     *
     * @param value The bytes for id to set.
     * @return This builder for chaining.
     */
    public Builder setIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      id_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private int featureType_ = 0;

    /**
     * .stigg.sidecar.v1.FeatureType feature_type = 2 [json_name = "featureType"];
     *
     * @return The enum numeric value on the wire for featureType.
     */
    @java.lang.Override
    public int getFeatureTypeValue() {
      return featureType_;
    }

    /**
     * .stigg.sidecar.v1.FeatureType feature_type = 2 [json_name = "featureType"];
     *
     * @param value The enum numeric value on the wire for featureType to set.
     * @return This builder for chaining.
     */
    public Builder setFeatureTypeValue(int value) {
      featureType_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    /**
     * .stigg.sidecar.v1.FeatureType feature_type = 2 [json_name = "featureType"];
     *
     * @return The featureType.
     */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.FeatureType getFeatureType() {
      io.stigg.sidecar.proto.v1.FeatureType result =
          io.stigg.sidecar.proto.v1.FeatureType.forNumber(featureType_);
      return result == null ? io.stigg.sidecar.proto.v1.FeatureType.UNRECOGNIZED : result;
    }

    /**
     * .stigg.sidecar.v1.FeatureType feature_type = 2 [json_name = "featureType"];
     *
     * @param value The featureType to set.
     * @return This builder for chaining.
     */
    public Builder setFeatureType(io.stigg.sidecar.proto.v1.FeatureType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000002;
      featureType_ = value.getNumber();
      onChanged();
      return this;
    }

    /**
     * .stigg.sidecar.v1.FeatureType feature_type = 2 [json_name = "featureType"];
     *
     * @return This builder for chaining.
     */
    public Builder clearFeatureType() {
      bitField0_ = (bitField0_ & ~0x00000002);
      featureType_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object units_ = "";

    /**
     * optional string units = 3 [json_name = "units"];
     *
     * @return Whether the units field is set.
     */
    public boolean hasUnits() {
      return ((bitField0_ & 0x00000004) != 0);
    }

    /**
     * optional string units = 3 [json_name = "units"];
     *
     * @return The units.
     */
    public java.lang.String getUnits() {
      java.lang.Object ref = units_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        units_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     * optional string units = 3 [json_name = "units"];
     *
     * @return The bytes for units.
     */
    public com.google.protobuf.ByteString getUnitsBytes() {
      java.lang.Object ref = units_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        units_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * optional string units = 3 [json_name = "units"];
     *
     * @param value The units to set.
     * @return This builder for chaining.
     */
    public Builder setUnits(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      units_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    /**
     * optional string units = 3 [json_name = "units"];
     *
     * @return This builder for chaining.
     */
    public Builder clearUnits() {
      units_ = getDefaultInstance().getUnits();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }

    /**
     * optional string units = 3 [json_name = "units"];
     *
     * @param value The bytes for units to set.
     * @return This builder for chaining.
     */
    public Builder setUnitsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      units_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private java.lang.Object unitsPlural_ = "";

    /**
     * optional string units_plural = 4 [json_name = "unitsPlural"];
     *
     * @return Whether the unitsPlural field is set.
     */
    public boolean hasUnitsPlural() {
      return ((bitField0_ & 0x00000008) != 0);
    }

    /**
     * optional string units_plural = 4 [json_name = "unitsPlural"];
     *
     * @return The unitsPlural.
     */
    public java.lang.String getUnitsPlural() {
      java.lang.Object ref = unitsPlural_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        unitsPlural_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     * optional string units_plural = 4 [json_name = "unitsPlural"];
     *
     * @return The bytes for unitsPlural.
     */
    public com.google.protobuf.ByteString getUnitsPluralBytes() {
      java.lang.Object ref = unitsPlural_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        unitsPlural_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * optional string units_plural = 4 [json_name = "unitsPlural"];
     *
     * @param value The unitsPlural to set.
     * @return This builder for chaining.
     */
    public Builder setUnitsPlural(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      unitsPlural_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    /**
     * optional string units_plural = 4 [json_name = "unitsPlural"];
     *
     * @return This builder for chaining.
     */
    public Builder clearUnitsPlural() {
      unitsPlural_ = getDefaultInstance().getUnitsPlural();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }

    /**
     * optional string units_plural = 4 [json_name = "unitsPlural"];
     *
     * @param value The bytes for unitsPlural to set.
     * @return This builder for chaining.
     */
    public Builder setUnitsPluralBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      unitsPlural_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private int meterType_ = 0;

    /**
     * .stigg.sidecar.v1.MeterType meter_type = 5 [json_name = "meterType"];
     *
     * @return The enum numeric value on the wire for meterType.
     */
    @java.lang.Override
    public int getMeterTypeValue() {
      return meterType_;
    }

    /**
     * .stigg.sidecar.v1.MeterType meter_type = 5 [json_name = "meterType"];
     *
     * @param value The enum numeric value on the wire for meterType to set.
     * @return This builder for chaining.
     */
    public Builder setMeterTypeValue(int value) {
      meterType_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    /**
     * .stigg.sidecar.v1.MeterType meter_type = 5 [json_name = "meterType"];
     *
     * @return The meterType.
     */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.MeterType getMeterType() {
      io.stigg.sidecar.proto.v1.MeterType result =
          io.stigg.sidecar.proto.v1.MeterType.forNumber(meterType_);
      return result == null ? io.stigg.sidecar.proto.v1.MeterType.UNRECOGNIZED : result;
    }

    /**
     * .stigg.sidecar.v1.MeterType meter_type = 5 [json_name = "meterType"];
     *
     * @param value The meterType to set.
     * @return This builder for chaining.
     */
    public Builder setMeterType(io.stigg.sidecar.proto.v1.MeterType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000010;
      meterType_ = value.getNumber();
      onChanged();
      return this;
    }

    /**
     * .stigg.sidecar.v1.MeterType meter_type = 5 [json_name = "meterType"];
     *
     * @return This builder for chaining.
     */
    public Builder clearMeterType() {
      bitField0_ = (bitField0_ & ~0x00000010);
      meterType_ = 0;
      onChanged();
      return this;
    }

    private boolean isMetered_;

    /**
     * bool is_metered = 6 [json_name = "isMetered"];
     *
     * @return The isMetered.
     */
    @java.lang.Override
    public boolean getIsMetered() {
      return isMetered_;
    }

    /**
     * bool is_metered = 6 [json_name = "isMetered"];
     *
     * @param value The isMetered to set.
     * @return This builder for chaining.
     */
    public Builder setIsMetered(boolean value) {

      isMetered_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    /**
     * bool is_metered = 6 [json_name = "isMetered"];
     *
     * @return This builder for chaining.
     */
    public Builder clearIsMetered() {
      bitField0_ = (bitField0_ & ~0x00000020);
      isMetered_ = 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:stigg.sidecar.v1.EntitlementFeature)
  }

  // @@protoc_insertion_point(class_scope:stigg.sidecar.v1.EntitlementFeature)
  private static final io.stigg.sidecar.proto.v1.EntitlementFeature DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new io.stigg.sidecar.proto.v1.EntitlementFeature();
  }

  public static io.stigg.sidecar.proto.v1.EntitlementFeature getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser PARSER =
      new com.google.protobuf.AbstractParser() {
        @java.lang.Override
        public EntitlementFeature parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public io.stigg.sidecar.proto.v1.EntitlementFeature getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy