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

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

There is a newer version: 2.112.1
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.Entitlement} */
public final class Entitlement extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:stigg.sidecar.v1.Entitlement)
    EntitlementOrBuilder {
  private static final long serialVersionUID = 0L;

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

  private Entitlement() {}

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

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

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

  private int entitlementCase_ = 0;

  @SuppressWarnings("serial")
  private java.lang.Object entitlement_;

  public enum EntitlementCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    BOOLEAN(1),
    NUMERIC(2),
    METERED(3),
    ENTITLEMENT_NOT_SET(0);
    private final int value;

    private EntitlementCase(int value) {
      this.value = value;
    }

    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static EntitlementCase valueOf(int value) {
      return forNumber(value);
    }

    public static EntitlementCase forNumber(int value) {
      switch (value) {
        case 1:
          return BOOLEAN;
        case 2:
          return NUMERIC;
        case 3:
          return METERED;
        case 0:
          return ENTITLEMENT_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public EntitlementCase getEntitlementCase() {
    return EntitlementCase.forNumber(entitlementCase_);
  }

  public static final int BOOLEAN_FIELD_NUMBER = 1;

  /**
   * .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"];
   *
   * @return Whether the boolean field is set.
   */
  @java.lang.Override
  public boolean hasBoolean() {
    return entitlementCase_ == 1;
  }

  /**
   * .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"];
   *
   * @return The boolean.
   */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.BooleanEntitlement getBoolean() {
    if (entitlementCase_ == 1) {
      return (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_;
    }
    return io.stigg.sidecar.proto.v1.BooleanEntitlement.getDefaultInstance();
  }

  /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.BooleanEntitlementOrBuilder getBooleanOrBuilder() {
    if (entitlementCase_ == 1) {
      return (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_;
    }
    return io.stigg.sidecar.proto.v1.BooleanEntitlement.getDefaultInstance();
  }

  public static final int NUMERIC_FIELD_NUMBER = 2;

  /**
   * .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"];
   *
   * @return Whether the numeric field is set.
   */
  @java.lang.Override
  public boolean hasNumeric() {
    return entitlementCase_ == 2;
  }

  /**
   * .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"];
   *
   * @return The numeric.
   */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.NumericEntitlement getNumeric() {
    if (entitlementCase_ == 2) {
      return (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_;
    }
    return io.stigg.sidecar.proto.v1.NumericEntitlement.getDefaultInstance();
  }

  /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.NumericEntitlementOrBuilder getNumericOrBuilder() {
    if (entitlementCase_ == 2) {
      return (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_;
    }
    return io.stigg.sidecar.proto.v1.NumericEntitlement.getDefaultInstance();
  }

  public static final int METERED_FIELD_NUMBER = 3;

  /**
   * .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"];
   *
   * @return Whether the metered field is set.
   */
  @java.lang.Override
  public boolean hasMetered() {
    return entitlementCase_ == 3;
  }

  /**
   * .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"];
   *
   * @return The metered.
   */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.MeteredEntitlement getMetered() {
    if (entitlementCase_ == 3) {
      return (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_;
    }
    return io.stigg.sidecar.proto.v1.MeteredEntitlement.getDefaultInstance();
  }

  /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.MeteredEntitlementOrBuilder getMeteredOrBuilder() {
    if (entitlementCase_ == 3) {
      return (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_;
    }
    return io.stigg.sidecar.proto.v1.MeteredEntitlement.getDefaultInstance();
  }

  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 (entitlementCase_ == 1) {
      output.writeMessage(1, (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_);
    }
    if (entitlementCase_ == 2) {
      output.writeMessage(2, (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_);
    }
    if (entitlementCase_ == 3) {
      output.writeMessage(3, (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (entitlementCase_ == 1) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              1, (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_);
    }
    if (entitlementCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_);
    }
    if (entitlementCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_);
    }
    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.Entitlement)) {
      return super.equals(obj);
    }
    io.stigg.sidecar.proto.v1.Entitlement other = (io.stigg.sidecar.proto.v1.Entitlement) obj;

    if (!getEntitlementCase().equals(other.getEntitlementCase())) return false;
    switch (entitlementCase_) {
      case 1:
        if (!getBoolean().equals(other.getBoolean())) return false;
        break;
      case 2:
        if (!getNumeric().equals(other.getNumeric())) return false;
        break;
      case 3:
        if (!getMetered().equals(other.getMetered())) return false;
        break;
      case 0:
      default:
    }
    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();
    switch (entitlementCase_) {
      case 1:
        hash = (37 * hash) + BOOLEAN_FIELD_NUMBER;
        hash = (53 * hash) + getBoolean().hashCode();
        break;
      case 2:
        hash = (37 * hash) + NUMERIC_FIELD_NUMBER;
        hash = (53 * hash) + getNumeric().hashCode();
        break;
      case 3:
        hash = (37 * hash) + METERED_FIELD_NUMBER;
        hash = (53 * hash) + getMetered().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static io.stigg.sidecar.proto.v1.Entitlement 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.Entitlement parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.stigg.sidecar.proto.v1.Entitlement 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.Entitlement parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (booleanBuilder_ != null) {
        booleanBuilder_.clear();
      }
      if (numericBuilder_ != null) {
        numericBuilder_.clear();
      }
      if (meteredBuilder_ != null) {
        meteredBuilder_.clear();
      }
      entitlementCase_ = 0;
      entitlement_ = null;
      return this;
    }

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

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

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

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

    private void buildPartial0(io.stigg.sidecar.proto.v1.Entitlement result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(io.stigg.sidecar.proto.v1.Entitlement result) {
      result.entitlementCase_ = entitlementCase_;
      result.entitlement_ = this.entitlement_;
      if (entitlementCase_ == 1 && booleanBuilder_ != null) {
        result.entitlement_ = booleanBuilder_.build();
      }
      if (entitlementCase_ == 2 && numericBuilder_ != null) {
        result.entitlement_ = numericBuilder_.build();
      }
      if (entitlementCase_ == 3 && meteredBuilder_ != null) {
        result.entitlement_ = meteredBuilder_.build();
      }
    }

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

    public Builder mergeFrom(io.stigg.sidecar.proto.v1.Entitlement other) {
      if (other == io.stigg.sidecar.proto.v1.Entitlement.getDefaultInstance()) return this;
      switch (other.getEntitlementCase()) {
        case BOOLEAN:
          {
            mergeBoolean(other.getBoolean());
            break;
          }
        case NUMERIC:
          {
            mergeNumeric(other.getNumeric());
            break;
          }
        case METERED:
          {
            mergeMetered(other.getMetered());
            break;
          }
        case ENTITLEMENT_NOT_SET:
          {
            break;
          }
      }
      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:
              {
                input.readMessage(getBooleanFieldBuilder().getBuilder(), extensionRegistry);
                entitlementCase_ = 1;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(getNumericFieldBuilder().getBuilder(), extensionRegistry);
                entitlementCase_ = 2;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getMeteredFieldBuilder().getBuilder(), extensionRegistry);
                entitlementCase_ = 3;
                break;
              } // case 26
            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 entitlementCase_ = 0;
    private java.lang.Object entitlement_;

    public EntitlementCase getEntitlementCase() {
      return EntitlementCase.forNumber(entitlementCase_);
    }

    public Builder clearEntitlement() {
      entitlementCase_ = 0;
      entitlement_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.BooleanEntitlement,
            io.stigg.sidecar.proto.v1.BooleanEntitlement.Builder,
            io.stigg.sidecar.proto.v1.BooleanEntitlementOrBuilder>
        booleanBuilder_;

    /**
     * .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"];
     *
     * @return Whether the boolean field is set.
     */
    @java.lang.Override
    public boolean hasBoolean() {
      return entitlementCase_ == 1;
    }

    /**
     * .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"];
     *
     * @return The boolean.
     */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.BooleanEntitlement getBoolean() {
      if (booleanBuilder_ == null) {
        if (entitlementCase_ == 1) {
          return (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_;
        }
        return io.stigg.sidecar.proto.v1.BooleanEntitlement.getDefaultInstance();
      } else {
        if (entitlementCase_ == 1) {
          return booleanBuilder_.getMessage();
        }
        return io.stigg.sidecar.proto.v1.BooleanEntitlement.getDefaultInstance();
      }
    }

    /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
    public Builder setBoolean(io.stigg.sidecar.proto.v1.BooleanEntitlement value) {
      if (booleanBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        entitlement_ = value;
        onChanged();
      } else {
        booleanBuilder_.setMessage(value);
      }
      entitlementCase_ = 1;
      return this;
    }

    /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
    public Builder setBoolean(
        io.stigg.sidecar.proto.v1.BooleanEntitlement.Builder builderForValue) {
      if (booleanBuilder_ == null) {
        entitlement_ = builderForValue.build();
        onChanged();
      } else {
        booleanBuilder_.setMessage(builderForValue.build());
      }
      entitlementCase_ = 1;
      return this;
    }

    /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
    public Builder mergeBoolean(io.stigg.sidecar.proto.v1.BooleanEntitlement value) {
      if (booleanBuilder_ == null) {
        if (entitlementCase_ == 1
            && entitlement_ != io.stigg.sidecar.proto.v1.BooleanEntitlement.getDefaultInstance()) {
          entitlement_ =
              io.stigg.sidecar.proto.v1.BooleanEntitlement.newBuilder(
                      (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          entitlement_ = value;
        }
        onChanged();
      } else {
        if (entitlementCase_ == 1) {
          booleanBuilder_.mergeFrom(value);
        } else {
          booleanBuilder_.setMessage(value);
        }
      }
      entitlementCase_ = 1;
      return this;
    }

    /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
    public Builder clearBoolean() {
      if (booleanBuilder_ == null) {
        if (entitlementCase_ == 1) {
          entitlementCase_ = 0;
          entitlement_ = null;
          onChanged();
        }
      } else {
        if (entitlementCase_ == 1) {
          entitlementCase_ = 0;
          entitlement_ = null;
        }
        booleanBuilder_.clear();
      }
      return this;
    }

    /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
    public io.stigg.sidecar.proto.v1.BooleanEntitlement.Builder getBooleanBuilder() {
      return getBooleanFieldBuilder().getBuilder();
    }

    /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.BooleanEntitlementOrBuilder getBooleanOrBuilder() {
      if ((entitlementCase_ == 1) && (booleanBuilder_ != null)) {
        return booleanBuilder_.getMessageOrBuilder();
      } else {
        if (entitlementCase_ == 1) {
          return (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_;
        }
        return io.stigg.sidecar.proto.v1.BooleanEntitlement.getDefaultInstance();
      }
    }

    /** .stigg.sidecar.v1.BooleanEntitlement boolean = 1 [json_name = "boolean"]; */
    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.BooleanEntitlement,
            io.stigg.sidecar.proto.v1.BooleanEntitlement.Builder,
            io.stigg.sidecar.proto.v1.BooleanEntitlementOrBuilder>
        getBooleanFieldBuilder() {
      if (booleanBuilder_ == null) {
        if (!(entitlementCase_ == 1)) {
          entitlement_ = io.stigg.sidecar.proto.v1.BooleanEntitlement.getDefaultInstance();
        }
        booleanBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                io.stigg.sidecar.proto.v1.BooleanEntitlement,
                io.stigg.sidecar.proto.v1.BooleanEntitlement.Builder,
                io.stigg.sidecar.proto.v1.BooleanEntitlementOrBuilder>(
                (io.stigg.sidecar.proto.v1.BooleanEntitlement) entitlement_,
                getParentForChildren(),
                isClean());
        entitlement_ = null;
      }
      entitlementCase_ = 1;
      onChanged();
      return booleanBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.NumericEntitlement,
            io.stigg.sidecar.proto.v1.NumericEntitlement.Builder,
            io.stigg.sidecar.proto.v1.NumericEntitlementOrBuilder>
        numericBuilder_;

    /**
     * .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"];
     *
     * @return Whether the numeric field is set.
     */
    @java.lang.Override
    public boolean hasNumeric() {
      return entitlementCase_ == 2;
    }

    /**
     * .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"];
     *
     * @return The numeric.
     */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.NumericEntitlement getNumeric() {
      if (numericBuilder_ == null) {
        if (entitlementCase_ == 2) {
          return (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_;
        }
        return io.stigg.sidecar.proto.v1.NumericEntitlement.getDefaultInstance();
      } else {
        if (entitlementCase_ == 2) {
          return numericBuilder_.getMessage();
        }
        return io.stigg.sidecar.proto.v1.NumericEntitlement.getDefaultInstance();
      }
    }

    /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
    public Builder setNumeric(io.stigg.sidecar.proto.v1.NumericEntitlement value) {
      if (numericBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        entitlement_ = value;
        onChanged();
      } else {
        numericBuilder_.setMessage(value);
      }
      entitlementCase_ = 2;
      return this;
    }

    /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
    public Builder setNumeric(
        io.stigg.sidecar.proto.v1.NumericEntitlement.Builder builderForValue) {
      if (numericBuilder_ == null) {
        entitlement_ = builderForValue.build();
        onChanged();
      } else {
        numericBuilder_.setMessage(builderForValue.build());
      }
      entitlementCase_ = 2;
      return this;
    }

    /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
    public Builder mergeNumeric(io.stigg.sidecar.proto.v1.NumericEntitlement value) {
      if (numericBuilder_ == null) {
        if (entitlementCase_ == 2
            && entitlement_ != io.stigg.sidecar.proto.v1.NumericEntitlement.getDefaultInstance()) {
          entitlement_ =
              io.stigg.sidecar.proto.v1.NumericEntitlement.newBuilder(
                      (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          entitlement_ = value;
        }
        onChanged();
      } else {
        if (entitlementCase_ == 2) {
          numericBuilder_.mergeFrom(value);
        } else {
          numericBuilder_.setMessage(value);
        }
      }
      entitlementCase_ = 2;
      return this;
    }

    /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
    public Builder clearNumeric() {
      if (numericBuilder_ == null) {
        if (entitlementCase_ == 2) {
          entitlementCase_ = 0;
          entitlement_ = null;
          onChanged();
        }
      } else {
        if (entitlementCase_ == 2) {
          entitlementCase_ = 0;
          entitlement_ = null;
        }
        numericBuilder_.clear();
      }
      return this;
    }

    /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
    public io.stigg.sidecar.proto.v1.NumericEntitlement.Builder getNumericBuilder() {
      return getNumericFieldBuilder().getBuilder();
    }

    /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.NumericEntitlementOrBuilder getNumericOrBuilder() {
      if ((entitlementCase_ == 2) && (numericBuilder_ != null)) {
        return numericBuilder_.getMessageOrBuilder();
      } else {
        if (entitlementCase_ == 2) {
          return (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_;
        }
        return io.stigg.sidecar.proto.v1.NumericEntitlement.getDefaultInstance();
      }
    }

    /** .stigg.sidecar.v1.NumericEntitlement numeric = 2 [json_name = "numeric"]; */
    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.NumericEntitlement,
            io.stigg.sidecar.proto.v1.NumericEntitlement.Builder,
            io.stigg.sidecar.proto.v1.NumericEntitlementOrBuilder>
        getNumericFieldBuilder() {
      if (numericBuilder_ == null) {
        if (!(entitlementCase_ == 2)) {
          entitlement_ = io.stigg.sidecar.proto.v1.NumericEntitlement.getDefaultInstance();
        }
        numericBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                io.stigg.sidecar.proto.v1.NumericEntitlement,
                io.stigg.sidecar.proto.v1.NumericEntitlement.Builder,
                io.stigg.sidecar.proto.v1.NumericEntitlementOrBuilder>(
                (io.stigg.sidecar.proto.v1.NumericEntitlement) entitlement_,
                getParentForChildren(),
                isClean());
        entitlement_ = null;
      }
      entitlementCase_ = 2;
      onChanged();
      return numericBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.MeteredEntitlement,
            io.stigg.sidecar.proto.v1.MeteredEntitlement.Builder,
            io.stigg.sidecar.proto.v1.MeteredEntitlementOrBuilder>
        meteredBuilder_;

    /**
     * .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"];
     *
     * @return Whether the metered field is set.
     */
    @java.lang.Override
    public boolean hasMetered() {
      return entitlementCase_ == 3;
    }

    /**
     * .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"];
     *
     * @return The metered.
     */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.MeteredEntitlement getMetered() {
      if (meteredBuilder_ == null) {
        if (entitlementCase_ == 3) {
          return (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_;
        }
        return io.stigg.sidecar.proto.v1.MeteredEntitlement.getDefaultInstance();
      } else {
        if (entitlementCase_ == 3) {
          return meteredBuilder_.getMessage();
        }
        return io.stigg.sidecar.proto.v1.MeteredEntitlement.getDefaultInstance();
      }
    }

    /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
    public Builder setMetered(io.stigg.sidecar.proto.v1.MeteredEntitlement value) {
      if (meteredBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        entitlement_ = value;
        onChanged();
      } else {
        meteredBuilder_.setMessage(value);
      }
      entitlementCase_ = 3;
      return this;
    }

    /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
    public Builder setMetered(
        io.stigg.sidecar.proto.v1.MeteredEntitlement.Builder builderForValue) {
      if (meteredBuilder_ == null) {
        entitlement_ = builderForValue.build();
        onChanged();
      } else {
        meteredBuilder_.setMessage(builderForValue.build());
      }
      entitlementCase_ = 3;
      return this;
    }

    /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
    public Builder mergeMetered(io.stigg.sidecar.proto.v1.MeteredEntitlement value) {
      if (meteredBuilder_ == null) {
        if (entitlementCase_ == 3
            && entitlement_ != io.stigg.sidecar.proto.v1.MeteredEntitlement.getDefaultInstance()) {
          entitlement_ =
              io.stigg.sidecar.proto.v1.MeteredEntitlement.newBuilder(
                      (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          entitlement_ = value;
        }
        onChanged();
      } else {
        if (entitlementCase_ == 3) {
          meteredBuilder_.mergeFrom(value);
        } else {
          meteredBuilder_.setMessage(value);
        }
      }
      entitlementCase_ = 3;
      return this;
    }

    /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
    public Builder clearMetered() {
      if (meteredBuilder_ == null) {
        if (entitlementCase_ == 3) {
          entitlementCase_ = 0;
          entitlement_ = null;
          onChanged();
        }
      } else {
        if (entitlementCase_ == 3) {
          entitlementCase_ = 0;
          entitlement_ = null;
        }
        meteredBuilder_.clear();
      }
      return this;
    }

    /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
    public io.stigg.sidecar.proto.v1.MeteredEntitlement.Builder getMeteredBuilder() {
      return getMeteredFieldBuilder().getBuilder();
    }

    /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.MeteredEntitlementOrBuilder getMeteredOrBuilder() {
      if ((entitlementCase_ == 3) && (meteredBuilder_ != null)) {
        return meteredBuilder_.getMessageOrBuilder();
      } else {
        if (entitlementCase_ == 3) {
          return (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_;
        }
        return io.stigg.sidecar.proto.v1.MeteredEntitlement.getDefaultInstance();
      }
    }

    /** .stigg.sidecar.v1.MeteredEntitlement metered = 3 [json_name = "metered"]; */
    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.MeteredEntitlement,
            io.stigg.sidecar.proto.v1.MeteredEntitlement.Builder,
            io.stigg.sidecar.proto.v1.MeteredEntitlementOrBuilder>
        getMeteredFieldBuilder() {
      if (meteredBuilder_ == null) {
        if (!(entitlementCase_ == 3)) {
          entitlement_ = io.stigg.sidecar.proto.v1.MeteredEntitlement.getDefaultInstance();
        }
        meteredBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                io.stigg.sidecar.proto.v1.MeteredEntitlement,
                io.stigg.sidecar.proto.v1.MeteredEntitlement.Builder,
                io.stigg.sidecar.proto.v1.MeteredEntitlementOrBuilder>(
                (io.stigg.sidecar.proto.v1.MeteredEntitlement) entitlement_,
                getParentForChildren(),
                isClean());
        entitlement_ = null;
      }
      entitlementCase_ = 3;
      onChanged();
      return meteredBuilder_;
    }

    @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.Entitlement)
  }

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

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

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

  private static final com.google.protobuf.Parser PARSER =
      new com.google.protobuf.AbstractParser() {
        @java.lang.Override
        public Entitlement 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.Entitlement getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy