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

io.stigg.sidecar.proto.v1.LocalSidecarConfig 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.LocalSidecarConfig} */
public final class LocalSidecarConfig extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:stigg.sidecar.v1.LocalSidecarConfig)
    LocalSidecarConfigOrBuilder {
  private static final long serialVersionUID = 0L;

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

  private LocalSidecarConfig() {
    wsUrl_ = "";
  }

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

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

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 8:
        return internalGetEntitlementsFallback();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

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

  private int bitField0_;
  public static final int WS_ENABLED_FIELD_NUMBER = 5;
  private boolean wsEnabled_ = false;

  /**
   * optional bool ws_enabled = 5 [json_name = "wsEnabled"];
   *
   * @return Whether the wsEnabled field is set.
   */
  @java.lang.Override
  public boolean hasWsEnabled() {
    return ((bitField0_ & 0x00000001) != 0);
  }

  /**
   * optional bool ws_enabled = 5 [json_name = "wsEnabled"];
   *
   * @return The wsEnabled.
   */
  @java.lang.Override
  public boolean getWsEnabled() {
    return wsEnabled_;
  }

  public static final int WS_URL_FIELD_NUMBER = 6;

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

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

  /**
   * optional string ws_url = 6 [json_name = "wsUrl"];
   *
   * @return The wsUrl.
   */
  @java.lang.Override
  public java.lang.String getWsUrl() {
    java.lang.Object ref = wsUrl_;
    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();
      wsUrl_ = s;
      return s;
    }
  }

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

  public static final int REDIS_FIELD_NUMBER = 7;
  private io.stigg.sidecar.proto.v1.RedisOptions redis_;

  /**
   * optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"];
   *
   * @return Whether the redis field is set.
   */
  @java.lang.Override
  public boolean hasRedis() {
    return ((bitField0_ & 0x00000004) != 0);
  }

  /**
   * optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"];
   *
   * @return The redis.
   */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.RedisOptions getRedis() {
    return redis_ == null ? io.stigg.sidecar.proto.v1.RedisOptions.getDefaultInstance() : redis_;
  }

  /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.RedisOptionsOrBuilder getRedisOrBuilder() {
    return redis_ == null ? io.stigg.sidecar.proto.v1.RedisOptions.getDefaultInstance() : redis_;
  }

  public static final int ENTITLEMENTS_FALLBACK_FIELD_NUMBER = 8;

  private static final class EntitlementsFallbackDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
            java.lang.String, io.stigg.sidecar.proto.v1.EntitlementFallback>
        defaultEntry =
            com.google.protobuf.MapEntry
                .
                    newDefaultInstance(
                        io.stigg.sidecar.proto.v1.SidecarProto
                            .internal_static_stigg_sidecar_v1_LocalSidecarConfig_EntitlementsFallbackEntry_descriptor,
                        com.google.protobuf.WireFormat.FieldType.STRING,
                        "",
                        com.google.protobuf.WireFormat.FieldType.MESSAGE,
                        io.stigg.sidecar.proto.v1.EntitlementFallback.getDefaultInstance());
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
          java.lang.String, io.stigg.sidecar.proto.v1.EntitlementFallback>
      entitlementsFallback_;

  private com.google.protobuf.MapField<
          java.lang.String, io.stigg.sidecar.proto.v1.EntitlementFallback>
      internalGetEntitlementsFallback() {
    if (entitlementsFallback_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          EntitlementsFallbackDefaultEntryHolder.defaultEntry);
    }
    return entitlementsFallback_;
  }

  public int getEntitlementsFallbackCount() {
    return internalGetEntitlementsFallback().getMap().size();
  }

  /**
   * 
   * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
   * 
   */
  @java.lang.Override
  public boolean containsEntitlementsFallback(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetEntitlementsFallback().getMap().containsKey(key);
  }

  /** Use {@link #getEntitlementsFallbackMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map
      getEntitlementsFallback() {
    return getEntitlementsFallbackMap();
  }

  /**
   * 
   * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
   * 
   */
  @java.lang.Override
  public java.util.Map
      getEntitlementsFallbackMap() {
    return internalGetEntitlementsFallback().getMap();
  }

  /**
   * 
   * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
   * 
   */
  @java.lang.Override
  public /* nullable */ io.stigg.sidecar.proto.v1.EntitlementFallback
      getEntitlementsFallbackOrDefault(
          java.lang.String key,
          /* nullable */
          io.stigg.sidecar.proto.v1.EntitlementFallback defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map map =
        internalGetEntitlementsFallback().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }

  /**
   * 
   * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
   * 
   */
  @java.lang.Override
  public io.stigg.sidecar.proto.v1.EntitlementFallback getEntitlementsFallbackOrThrow(
      java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map map =
        internalGetEntitlementsFallback().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int CACHE_MAX_SIZE_BYTES_FIELD_NUMBER = 9;
  private long cacheMaxSizeBytes_ = 0L;

  /**
   * optional int64 cache_max_size_bytes = 9 [json_name = "cacheMaxSizeBytes"];
   *
   * @return Whether the cacheMaxSizeBytes field is set.
   */
  @java.lang.Override
  public boolean hasCacheMaxSizeBytes() {
    return ((bitField0_ & 0x00000008) != 0);
  }

  /**
   * optional int64 cache_max_size_bytes = 9 [json_name = "cacheMaxSizeBytes"];
   *
   * @return The cacheMaxSizeBytes.
   */
  @java.lang.Override
  public long getCacheMaxSizeBytes() {
    return cacheMaxSizeBytes_;
  }

  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)) {
      output.writeBool(5, wsEnabled_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, wsUrl_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(7, getRedis());
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output,
        internalGetEntitlementsFallback(),
        EntitlementsFallbackDefaultEntryHolder.defaultEntry,
        8);
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeInt64(9, cacheMaxSizeBytes_);
    }
    getUnknownFields().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.CodedOutputStream.computeBoolSize(5, wsEnabled_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, wsUrl_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRedis());
    }
    for (java.util.Map.Entry
        entry : internalGetEntitlementsFallback().getMap().entrySet()) {
      com.google.protobuf.MapEntry
          entitlementsFallback__ =
              EntitlementsFallbackDefaultEntryHolder.defaultEntry
                  .newBuilderForType()
                  .setKey(entry.getKey())
                  .setValue(entry.getValue())
                  .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, entitlementsFallback__);
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, cacheMaxSizeBytes_);
    }
    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.LocalSidecarConfig)) {
      return super.equals(obj);
    }
    io.stigg.sidecar.proto.v1.LocalSidecarConfig other =
        (io.stigg.sidecar.proto.v1.LocalSidecarConfig) obj;

    if (hasWsEnabled() != other.hasWsEnabled()) return false;
    if (hasWsEnabled()) {
      if (getWsEnabled() != other.getWsEnabled()) return false;
    }
    if (hasWsUrl() != other.hasWsUrl()) return false;
    if (hasWsUrl()) {
      if (!getWsUrl().equals(other.getWsUrl())) return false;
    }
    if (hasRedis() != other.hasRedis()) return false;
    if (hasRedis()) {
      if (!getRedis().equals(other.getRedis())) return false;
    }
    if (!internalGetEntitlementsFallback().equals(other.internalGetEntitlementsFallback()))
      return false;
    if (hasCacheMaxSizeBytes() != other.hasCacheMaxSizeBytes()) return false;
    if (hasCacheMaxSizeBytes()) {
      if (getCacheMaxSizeBytes() != other.getCacheMaxSizeBytes()) 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();
    if (hasWsEnabled()) {
      hash = (37 * hash) + WS_ENABLED_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWsEnabled());
    }
    if (hasWsUrl()) {
      hash = (37 * hash) + WS_URL_FIELD_NUMBER;
      hash = (53 * hash) + getWsUrl().hashCode();
    }
    if (hasRedis()) {
      hash = (37 * hash) + REDIS_FIELD_NUMBER;
      hash = (53 * hash) + getRedis().hashCode();
    }
    if (!internalGetEntitlementsFallback().getMap().isEmpty()) {
      hash = (37 * hash) + ENTITLEMENTS_FALLBACK_FIELD_NUMBER;
      hash = (53 * hash) + internalGetEntitlementsFallback().hashCode();
    }
    if (hasCacheMaxSizeBytes()) {
      hash = (37 * hash) + CACHE_MAX_SIZE_BYTES_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCacheMaxSizeBytes());
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 8:
          return internalGetEntitlementsFallback();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 8:
          return internalGetMutableEntitlementsFallback();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

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

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

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

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
        getRedisFieldBuilder();
      }
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      wsEnabled_ = false;
      wsUrl_ = "";
      redis_ = null;
      if (redisBuilder_ != null) {
        redisBuilder_.dispose();
        redisBuilder_ = null;
      }
      internalGetMutableEntitlementsFallback().clear();
      cacheMaxSizeBytes_ = 0L;
      return this;
    }

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

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

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

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

    private void buildPartial0(io.stigg.sidecar.proto.v1.LocalSidecarConfig result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.wsEnabled_ = wsEnabled_;
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.wsUrl_ = wsUrl_;
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.redis_ = redisBuilder_ == null ? redis_ : redisBuilder_.build();
        to_bitField0_ |= 0x00000004;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.entitlementsFallback_ = internalGetEntitlementsFallback();
        result.entitlementsFallback_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.cacheMaxSizeBytes_ = cacheMaxSizeBytes_;
        to_bitField0_ |= 0x00000008;
      }
      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.LocalSidecarConfig) {
        return mergeFrom((io.stigg.sidecar.proto.v1.LocalSidecarConfig) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.stigg.sidecar.proto.v1.LocalSidecarConfig other) {
      if (other == io.stigg.sidecar.proto.v1.LocalSidecarConfig.getDefaultInstance()) return this;
      if (other.hasWsEnabled()) {
        setWsEnabled(other.getWsEnabled());
      }
      if (other.hasWsUrl()) {
        wsUrl_ = other.wsUrl_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (other.hasRedis()) {
        mergeRedis(other.getRedis());
      }
      internalGetMutableEntitlementsFallback().mergeFrom(other.internalGetEntitlementsFallback());
      bitField0_ |= 0x00000008;
      if (other.hasCacheMaxSizeBytes()) {
        setCacheMaxSizeBytes(other.getCacheMaxSizeBytes());
      }
      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 40:
              {
                wsEnabled_ = input.readBool();
                bitField0_ |= 0x00000001;
                break;
              } // case 40
            case 50:
              {
                wsUrl_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 50
            case 58:
              {
                input.readMessage(getRedisFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 58
            case 66:
              {
                com.google.protobuf.MapEntry<
                        java.lang.String, io.stigg.sidecar.proto.v1.EntitlementFallback>
                    entitlementsFallback__ =
                        input.readMessage(
                            EntitlementsFallbackDefaultEntryHolder.defaultEntry.getParserForType(),
                            extensionRegistry);
                internalGetMutableEntitlementsFallback()
                    .getMutableMap()
                    .put(entitlementsFallback__.getKey(), entitlementsFallback__.getValue());
                bitField0_ |= 0x00000008;
                break;
              } // case 66
            case 72:
              {
                cacheMaxSizeBytes_ = input.readInt64();
                bitField0_ |= 0x00000010;
                break;
              } // case 72
            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 boolean wsEnabled_;

    /**
     * optional bool ws_enabled = 5 [json_name = "wsEnabled"];
     *
     * @return Whether the wsEnabled field is set.
     */
    @java.lang.Override
    public boolean hasWsEnabled() {
      return ((bitField0_ & 0x00000001) != 0);
    }

    /**
     * optional bool ws_enabled = 5 [json_name = "wsEnabled"];
     *
     * @return The wsEnabled.
     */
    @java.lang.Override
    public boolean getWsEnabled() {
      return wsEnabled_;
    }

    /**
     * optional bool ws_enabled = 5 [json_name = "wsEnabled"];
     *
     * @param value The wsEnabled to set.
     * @return This builder for chaining.
     */
    public Builder setWsEnabled(boolean value) {

      wsEnabled_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    /**
     * optional bool ws_enabled = 5 [json_name = "wsEnabled"];
     *
     * @return This builder for chaining.
     */
    public Builder clearWsEnabled() {
      bitField0_ = (bitField0_ & ~0x00000001);
      wsEnabled_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object wsUrl_ = "";

    /**
     * optional string ws_url = 6 [json_name = "wsUrl"];
     *
     * @return Whether the wsUrl field is set.
     */
    public boolean hasWsUrl() {
      return ((bitField0_ & 0x00000002) != 0);
    }

    /**
     * optional string ws_url = 6 [json_name = "wsUrl"];
     *
     * @return The wsUrl.
     */
    public java.lang.String getWsUrl() {
      java.lang.Object ref = wsUrl_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        wsUrl_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     * optional string ws_url = 6 [json_name = "wsUrl"];
     *
     * @return The bytes for wsUrl.
     */
    public com.google.protobuf.ByteString getWsUrlBytes() {
      java.lang.Object ref = wsUrl_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        wsUrl_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * optional string ws_url = 6 [json_name = "wsUrl"];
     *
     * @param value The wsUrl to set.
     * @return This builder for chaining.
     */
    public Builder setWsUrl(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      wsUrl_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    /**
     * optional string ws_url = 6 [json_name = "wsUrl"];
     *
     * @return This builder for chaining.
     */
    public Builder clearWsUrl() {
      wsUrl_ = getDefaultInstance().getWsUrl();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }

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

    private io.stigg.sidecar.proto.v1.RedisOptions redis_;
    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.RedisOptions,
            io.stigg.sidecar.proto.v1.RedisOptions.Builder,
            io.stigg.sidecar.proto.v1.RedisOptionsOrBuilder>
        redisBuilder_;

    /**
     * optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"];
     *
     * @return Whether the redis field is set.
     */
    public boolean hasRedis() {
      return ((bitField0_ & 0x00000004) != 0);
    }

    /**
     * optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"];
     *
     * @return The redis.
     */
    public io.stigg.sidecar.proto.v1.RedisOptions getRedis() {
      if (redisBuilder_ == null) {
        return redis_ == null
            ? io.stigg.sidecar.proto.v1.RedisOptions.getDefaultInstance()
            : redis_;
      } else {
        return redisBuilder_.getMessage();
      }
    }

    /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
    public Builder setRedis(io.stigg.sidecar.proto.v1.RedisOptions value) {
      if (redisBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        redis_ = value;
      } else {
        redisBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
    public Builder setRedis(io.stigg.sidecar.proto.v1.RedisOptions.Builder builderForValue) {
      if (redisBuilder_ == null) {
        redis_ = builderForValue.build();
      } else {
        redisBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
    public Builder mergeRedis(io.stigg.sidecar.proto.v1.RedisOptions value) {
      if (redisBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && redis_ != null
            && redis_ != io.stigg.sidecar.proto.v1.RedisOptions.getDefaultInstance()) {
          getRedisBuilder().mergeFrom(value);
        } else {
          redis_ = value;
        }
      } else {
        redisBuilder_.mergeFrom(value);
      }
      if (redis_ != null) {
        bitField0_ |= 0x00000004;
        onChanged();
      }
      return this;
    }

    /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
    public Builder clearRedis() {
      bitField0_ = (bitField0_ & ~0x00000004);
      redis_ = null;
      if (redisBuilder_ != null) {
        redisBuilder_.dispose();
        redisBuilder_ = null;
      }
      onChanged();
      return this;
    }

    /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
    public io.stigg.sidecar.proto.v1.RedisOptions.Builder getRedisBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getRedisFieldBuilder().getBuilder();
    }

    /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
    public io.stigg.sidecar.proto.v1.RedisOptionsOrBuilder getRedisOrBuilder() {
      if (redisBuilder_ != null) {
        return redisBuilder_.getMessageOrBuilder();
      } else {
        return redis_ == null
            ? io.stigg.sidecar.proto.v1.RedisOptions.getDefaultInstance()
            : redis_;
      }
    }

    /** optional .stigg.sidecar.v1.RedisOptions redis = 7 [json_name = "redis"]; */
    private com.google.protobuf.SingleFieldBuilderV3<
            io.stigg.sidecar.proto.v1.RedisOptions,
            io.stigg.sidecar.proto.v1.RedisOptions.Builder,
            io.stigg.sidecar.proto.v1.RedisOptionsOrBuilder>
        getRedisFieldBuilder() {
      if (redisBuilder_ == null) {
        redisBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                io.stigg.sidecar.proto.v1.RedisOptions,
                io.stigg.sidecar.proto.v1.RedisOptions.Builder,
                io.stigg.sidecar.proto.v1.RedisOptionsOrBuilder>(
                getRedis(), getParentForChildren(), isClean());
        redis_ = null;
      }
      return redisBuilder_;
    }

    private com.google.protobuf.MapField<
            java.lang.String, io.stigg.sidecar.proto.v1.EntitlementFallback>
        entitlementsFallback_;

    private com.google.protobuf.MapField<
            java.lang.String, io.stigg.sidecar.proto.v1.EntitlementFallback>
        internalGetEntitlementsFallback() {
      if (entitlementsFallback_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            EntitlementsFallbackDefaultEntryHolder.defaultEntry);
      }
      return entitlementsFallback_;
    }

    private com.google.protobuf.MapField<
            java.lang.String, io.stigg.sidecar.proto.v1.EntitlementFallback>
        internalGetMutableEntitlementsFallback() {
      if (entitlementsFallback_ == null) {
        entitlementsFallback_ =
            com.google.protobuf.MapField.newMapField(
                EntitlementsFallbackDefaultEntryHolder.defaultEntry);
      }
      if (!entitlementsFallback_.isMutable()) {
        entitlementsFallback_ = entitlementsFallback_.copy();
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return entitlementsFallback_;
    }

    public int getEntitlementsFallbackCount() {
      return internalGetEntitlementsFallback().getMap().size();
    }

    /**
     * 
     * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
     * 
     */
    @java.lang.Override
    public boolean containsEntitlementsFallback(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetEntitlementsFallback().getMap().containsKey(key);
    }

    /** Use {@link #getEntitlementsFallbackMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map
        getEntitlementsFallback() {
      return getEntitlementsFallbackMap();
    }

    /**
     * 
     * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
     * 
     */
    @java.lang.Override
    public java.util.Map
        getEntitlementsFallbackMap() {
      return internalGetEntitlementsFallback().getMap();
    }

    /**
     * 
     * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
     * 
     */
    @java.lang.Override
    public /* nullable */ io.stigg.sidecar.proto.v1.EntitlementFallback
        getEntitlementsFallbackOrDefault(
            java.lang.String key,
            /* nullable */
            io.stigg.sidecar.proto.v1.EntitlementFallback defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map map =
          internalGetEntitlementsFallback().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }

    /**
     * 
     * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
     * 
     */
    @java.lang.Override
    public io.stigg.sidecar.proto.v1.EntitlementFallback getEntitlementsFallbackOrThrow(
        java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map map =
          internalGetEntitlementsFallback().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearEntitlementsFallback() {
      bitField0_ = (bitField0_ & ~0x00000008);
      internalGetMutableEntitlementsFallback().getMutableMap().clear();
      return this;
    }

    /**
     * 
     * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
     * 
     */
    public Builder removeEntitlementsFallback(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableEntitlementsFallback().getMutableMap().remove(key);
      return this;
    }

    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map
        getMutableEntitlementsFallback() {
      bitField0_ |= 0x00000008;
      return internalGetMutableEntitlementsFallback().getMutableMap();
    }

    /**
     * 
     * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
     * 
     */
    public Builder putEntitlementsFallback(
        java.lang.String key, io.stigg.sidecar.proto.v1.EntitlementFallback value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableEntitlementsFallback().getMutableMap().put(key, value);
      bitField0_ |= 0x00000008;
      return this;
    }

    /**
     * 
     * map<string, .stigg.sidecar.v1.EntitlementFallback> entitlements_fallback = 8 [json_name = "entitlementsFallback"];
     * 
     */
    public Builder putAllEntitlementsFallback(
        java.util.Map values) {
      internalGetMutableEntitlementsFallback().getMutableMap().putAll(values);
      bitField0_ |= 0x00000008;
      return this;
    }

    private long cacheMaxSizeBytes_;

    /**
     * optional int64 cache_max_size_bytes = 9 [json_name = "cacheMaxSizeBytes"];
     *
     * @return Whether the cacheMaxSizeBytes field is set.
     */
    @java.lang.Override
    public boolean hasCacheMaxSizeBytes() {
      return ((bitField0_ & 0x00000010) != 0);
    }

    /**
     * optional int64 cache_max_size_bytes = 9 [json_name = "cacheMaxSizeBytes"];
     *
     * @return The cacheMaxSizeBytes.
     */
    @java.lang.Override
    public long getCacheMaxSizeBytes() {
      return cacheMaxSizeBytes_;
    }

    /**
     * optional int64 cache_max_size_bytes = 9 [json_name = "cacheMaxSizeBytes"];
     *
     * @param value The cacheMaxSizeBytes to set.
     * @return This builder for chaining.
     */
    public Builder setCacheMaxSizeBytes(long value) {

      cacheMaxSizeBytes_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    /**
     * optional int64 cache_max_size_bytes = 9 [json_name = "cacheMaxSizeBytes"];
     *
     * @return This builder for chaining.
     */
    public Builder clearCacheMaxSizeBytes() {
      bitField0_ = (bitField0_ & ~0x00000010);
      cacheMaxSizeBytes_ = 0L;
      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.LocalSidecarConfig)
  }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy