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

org.finos.tracdap.config.AuthenticationConfig Maven / Gradle / Ivy

Go to download

TRAC D.A.P. config library, contains data structures used for config files (and other config sources)

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: tracdap/config/common.proto
// Protobuf Java Version: 4.28.2

package org.finos.tracdap.config;

/**
 * Protobuf type {@code tracdap.config.AuthenticationConfig}
 */
public final class AuthenticationConfig extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:tracdap.config.AuthenticationConfig)
    AuthenticationConfigOrBuilder {
private static final long serialVersionUID = 0L;
  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 28,
      /* patch= */ 2,
      /* suffix= */ "",
      AuthenticationConfig.class.getName());
  }
  // Use AuthenticationConfig.newBuilder() to construct.
  private AuthenticationConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private AuthenticationConfig() {
    jwtIssuer_ = "";
    systemUserId_ = "";
    systemUserName_ = "";
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.finos.tracdap.config.Common.internal_static_tracdap_config_AuthenticationConfig_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.finos.tracdap.config.Common.internal_static_tracdap_config_AuthenticationConfig_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.finos.tracdap.config.AuthenticationConfig.class, org.finos.tracdap.config.AuthenticationConfig.Builder.class);
  }

  private int bitField0_;
  public static final int JWTISSUER_FIELD_NUMBER = 1;
  @SuppressWarnings("serial")
  private volatile java.lang.Object jwtIssuer_ = "";
  /**
   * string jwtIssuer = 1;
   * @return The jwtIssuer.
   */
  @java.lang.Override
  public java.lang.String getJwtIssuer() {
    java.lang.Object ref = jwtIssuer_;
    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();
      jwtIssuer_ = s;
      return s;
    }
  }
  /**
   * string jwtIssuer = 1;
   * @return The bytes for jwtIssuer.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getJwtIssuerBytes() {
    java.lang.Object ref = jwtIssuer_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      jwtIssuer_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int JWTEXPIRY_FIELD_NUMBER = 2;
  private int jwtExpiry_ = 0;
  /**
   * sint32 jwtExpiry = 2;
   * @return The jwtExpiry.
   */
  @java.lang.Override
  public int getJwtExpiry() {
    return jwtExpiry_;
  }

  public static final int JWTLIMIT_FIELD_NUMBER = 6;
  private int jwtLimit_ = 0;
  /**
   * sint32 jwtLimit = 6;
   * @return The jwtLimit.
   */
  @java.lang.Override
  public int getJwtLimit() {
    return jwtLimit_;
  }

  public static final int JWTREFRESH_FIELD_NUMBER = 7;
  private int jwtRefresh_ = 0;
  /**
   * sint32 jwtRefresh = 7;
   * @return The jwtRefresh.
   */
  @java.lang.Override
  public int getJwtRefresh() {
    return jwtRefresh_;
  }

  public static final int PROVIDER_FIELD_NUMBER = 3;
  private org.finos.tracdap.config.PluginConfig provider_;
  /**
   * optional .tracdap.config.PluginConfig provider = 3;
   * @return Whether the provider field is set.
   */
  @java.lang.Override
  public boolean hasProvider() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * optional .tracdap.config.PluginConfig provider = 3;
   * @return The provider.
   */
  @java.lang.Override
  public org.finos.tracdap.config.PluginConfig getProvider() {
    return provider_ == null ? org.finos.tracdap.config.PluginConfig.getDefaultInstance() : provider_;
  }
  /**
   * optional .tracdap.config.PluginConfig provider = 3;
   */
  @java.lang.Override
  public org.finos.tracdap.config.PluginConfigOrBuilder getProviderOrBuilder() {
    return provider_ == null ? org.finos.tracdap.config.PluginConfig.getDefaultInstance() : provider_;
  }

  public static final int DISABLEAUTH_FIELD_NUMBER = 4;
  private boolean disableAuth_ = false;
  /**
   * bool disableAuth = 4;
   * @return The disableAuth.
   */
  @java.lang.Override
  public boolean getDisableAuth() {
    return disableAuth_;
  }

  public static final int DISABLESIGNING_FIELD_NUMBER = 5;
  private boolean disableSigning_ = false;
  /**
   * bool disableSigning = 5;
   * @return The disableSigning.
   */
  @java.lang.Override
  public boolean getDisableSigning() {
    return disableSigning_;
  }

  public static final int SYSTEMUSERID_FIELD_NUMBER = 8;
  @SuppressWarnings("serial")
  private volatile java.lang.Object systemUserId_ = "";
  /**
   * string systemUserId = 8;
   * @return The systemUserId.
   */
  @java.lang.Override
  public java.lang.String getSystemUserId() {
    java.lang.Object ref = systemUserId_;
    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();
      systemUserId_ = s;
      return s;
    }
  }
  /**
   * string systemUserId = 8;
   * @return The bytes for systemUserId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getSystemUserIdBytes() {
    java.lang.Object ref = systemUserId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      systemUserId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SYSTEMUSERNAME_FIELD_NUMBER = 9;
  @SuppressWarnings("serial")
  private volatile java.lang.Object systemUserName_ = "";
  /**
   * string systemUserName = 9;
   * @return The systemUserName.
   */
  @java.lang.Override
  public java.lang.String getSystemUserName() {
    java.lang.Object ref = systemUserName_;
    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();
      systemUserName_ = s;
      return s;
    }
  }
  /**
   * string systemUserName = 9;
   * @return The bytes for systemUserName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getSystemUserNameBytes() {
    java.lang.Object ref = systemUserName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      systemUserName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SYSTEMTICKETDURATION_FIELD_NUMBER = 10;
  private int systemTicketDuration_ = 0;
  /**
   * sint32 systemTicketDuration = 10;
   * @return The systemTicketDuration.
   */
  @java.lang.Override
  public int getSystemTicketDuration() {
    return systemTicketDuration_;
  }

  public static final int SYSTEMTICKETREFRESH_FIELD_NUMBER = 11;
  private int systemTicketRefresh_ = 0;
  /**
   * sint32 systemTicketRefresh = 11;
   * @return The systemTicketRefresh.
   */
  @java.lang.Override
  public int getSystemTicketRefresh() {
    return systemTicketRefresh_;
  }

  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.GeneratedMessage.isStringEmpty(jwtIssuer_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 1, jwtIssuer_);
    }
    if (jwtExpiry_ != 0) {
      output.writeSInt32(2, jwtExpiry_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(3, getProvider());
    }
    if (disableAuth_ != false) {
      output.writeBool(4, disableAuth_);
    }
    if (disableSigning_ != false) {
      output.writeBool(5, disableSigning_);
    }
    if (jwtLimit_ != 0) {
      output.writeSInt32(6, jwtLimit_);
    }
    if (jwtRefresh_ != 0) {
      output.writeSInt32(7, jwtRefresh_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(systemUserId_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 8, systemUserId_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(systemUserName_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 9, systemUserName_);
    }
    if (systemTicketDuration_ != 0) {
      output.writeSInt32(10, systemTicketDuration_);
    }
    if (systemTicketRefresh_ != 0) {
      output.writeSInt32(11, systemTicketRefresh_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jwtIssuer_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, jwtIssuer_);
    }
    if (jwtExpiry_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(2, jwtExpiry_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getProvider());
    }
    if (disableAuth_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(4, disableAuth_);
    }
    if (disableSigning_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(5, disableSigning_);
    }
    if (jwtLimit_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(6, jwtLimit_);
    }
    if (jwtRefresh_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(7, jwtRefresh_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(systemUserId_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(8, systemUserId_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(systemUserName_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(9, systemUserName_);
    }
    if (systemTicketDuration_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(10, systemTicketDuration_);
    }
    if (systemTicketRefresh_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(11, systemTicketRefresh_);
    }
    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 org.finos.tracdap.config.AuthenticationConfig)) {
      return super.equals(obj);
    }
    org.finos.tracdap.config.AuthenticationConfig other = (org.finos.tracdap.config.AuthenticationConfig) obj;

    if (!getJwtIssuer()
        .equals(other.getJwtIssuer())) return false;
    if (getJwtExpiry()
        != other.getJwtExpiry()) return false;
    if (getJwtLimit()
        != other.getJwtLimit()) return false;
    if (getJwtRefresh()
        != other.getJwtRefresh()) return false;
    if (hasProvider() != other.hasProvider()) return false;
    if (hasProvider()) {
      if (!getProvider()
          .equals(other.getProvider())) return false;
    }
    if (getDisableAuth()
        != other.getDisableAuth()) return false;
    if (getDisableSigning()
        != other.getDisableSigning()) return false;
    if (!getSystemUserId()
        .equals(other.getSystemUserId())) return false;
    if (!getSystemUserName()
        .equals(other.getSystemUserName())) return false;
    if (getSystemTicketDuration()
        != other.getSystemTicketDuration()) return false;
    if (getSystemTicketRefresh()
        != other.getSystemTicketRefresh()) 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) + JWTISSUER_FIELD_NUMBER;
    hash = (53 * hash) + getJwtIssuer().hashCode();
    hash = (37 * hash) + JWTEXPIRY_FIELD_NUMBER;
    hash = (53 * hash) + getJwtExpiry();
    hash = (37 * hash) + JWTLIMIT_FIELD_NUMBER;
    hash = (53 * hash) + getJwtLimit();
    hash = (37 * hash) + JWTREFRESH_FIELD_NUMBER;
    hash = (53 * hash) + getJwtRefresh();
    if (hasProvider()) {
      hash = (37 * hash) + PROVIDER_FIELD_NUMBER;
      hash = (53 * hash) + getProvider().hashCode();
    }
    hash = (37 * hash) + DISABLEAUTH_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getDisableAuth());
    hash = (37 * hash) + DISABLESIGNING_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getDisableSigning());
    hash = (37 * hash) + SYSTEMUSERID_FIELD_NUMBER;
    hash = (53 * hash) + getSystemUserId().hashCode();
    hash = (37 * hash) + SYSTEMUSERNAME_FIELD_NUMBER;
    hash = (53 * hash) + getSystemUserName().hashCode();
    hash = (37 * hash) + SYSTEMTICKETDURATION_FIELD_NUMBER;
    hash = (53 * hash) + getSystemTicketDuration();
    hash = (37 * hash) + SYSTEMTICKETREFRESH_FIELD_NUMBER;
    hash = (53 * hash) + getSystemTicketRefresh();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static org.finos.tracdap.config.AuthenticationConfig parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.finos.tracdap.config.AuthenticationConfig parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.finos.tracdap.config.AuthenticationConfig parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.finos.tracdap.config.AuthenticationConfig 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.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code tracdap.config.AuthenticationConfig}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder implements
      // @@protoc_insertion_point(builder_implements:tracdap.config.AuthenticationConfig)
      org.finos.tracdap.config.AuthenticationConfigOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.finos.tracdap.config.Common.internal_static_tracdap_config_AuthenticationConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.finos.tracdap.config.Common.internal_static_tracdap_config_AuthenticationConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.finos.tracdap.config.AuthenticationConfig.class, org.finos.tracdap.config.AuthenticationConfig.Builder.class);
    }

    // Construct using org.finos.tracdap.config.AuthenticationConfig.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessage
              .alwaysUseFieldBuilders) {
        getProviderFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      jwtIssuer_ = "";
      jwtExpiry_ = 0;
      jwtLimit_ = 0;
      jwtRefresh_ = 0;
      provider_ = null;
      if (providerBuilder_ != null) {
        providerBuilder_.dispose();
        providerBuilder_ = null;
      }
      disableAuth_ = false;
      disableSigning_ = false;
      systemUserId_ = "";
      systemUserName_ = "";
      systemTicketDuration_ = 0;
      systemTicketRefresh_ = 0;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.finos.tracdap.config.Common.internal_static_tracdap_config_AuthenticationConfig_descriptor;
    }

    @java.lang.Override
    public org.finos.tracdap.config.AuthenticationConfig getDefaultInstanceForType() {
      return org.finos.tracdap.config.AuthenticationConfig.getDefaultInstance();
    }

    @java.lang.Override
    public org.finos.tracdap.config.AuthenticationConfig build() {
      org.finos.tracdap.config.AuthenticationConfig result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.finos.tracdap.config.AuthenticationConfig buildPartial() {
      org.finos.tracdap.config.AuthenticationConfig result = new org.finos.tracdap.config.AuthenticationConfig(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(org.finos.tracdap.config.AuthenticationConfig result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.jwtIssuer_ = jwtIssuer_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.jwtExpiry_ = jwtExpiry_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.jwtLimit_ = jwtLimit_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.jwtRefresh_ = jwtRefresh_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.provider_ = providerBuilder_ == null
            ? provider_
            : providerBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.disableAuth_ = disableAuth_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.disableSigning_ = disableSigning_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.systemUserId_ = systemUserId_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.systemUserName_ = systemUserName_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.systemTicketDuration_ = systemTicketDuration_;
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.systemTicketRefresh_ = systemTicketRefresh_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.finos.tracdap.config.AuthenticationConfig) {
        return mergeFrom((org.finos.tracdap.config.AuthenticationConfig)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.finos.tracdap.config.AuthenticationConfig other) {
      if (other == org.finos.tracdap.config.AuthenticationConfig.getDefaultInstance()) return this;
      if (!other.getJwtIssuer().isEmpty()) {
        jwtIssuer_ = other.jwtIssuer_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.getJwtExpiry() != 0) {
        setJwtExpiry(other.getJwtExpiry());
      }
      if (other.getJwtLimit() != 0) {
        setJwtLimit(other.getJwtLimit());
      }
      if (other.getJwtRefresh() != 0) {
        setJwtRefresh(other.getJwtRefresh());
      }
      if (other.hasProvider()) {
        mergeProvider(other.getProvider());
      }
      if (other.getDisableAuth() != false) {
        setDisableAuth(other.getDisableAuth());
      }
      if (other.getDisableSigning() != false) {
        setDisableSigning(other.getDisableSigning());
      }
      if (!other.getSystemUserId().isEmpty()) {
        systemUserId_ = other.systemUserId_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      if (!other.getSystemUserName().isEmpty()) {
        systemUserName_ = other.systemUserName_;
        bitField0_ |= 0x00000100;
        onChanged();
      }
      if (other.getSystemTicketDuration() != 0) {
        setSystemTicketDuration(other.getSystemTicketDuration());
      }
      if (other.getSystemTicketRefresh() != 0) {
        setSystemTicketRefresh(other.getSystemTicketRefresh());
      }
      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: {
              jwtIssuer_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 16: {
              jwtExpiry_ = input.readSInt32();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 26: {
              input.readMessage(
                  getProviderFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000010;
              break;
            } // case 26
            case 32: {
              disableAuth_ = input.readBool();
              bitField0_ |= 0x00000020;
              break;
            } // case 32
            case 40: {
              disableSigning_ = input.readBool();
              bitField0_ |= 0x00000040;
              break;
            } // case 40
            case 48: {
              jwtLimit_ = input.readSInt32();
              bitField0_ |= 0x00000004;
              break;
            } // case 48
            case 56: {
              jwtRefresh_ = input.readSInt32();
              bitField0_ |= 0x00000008;
              break;
            } // case 56
            case 66: {
              systemUserId_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000080;
              break;
            } // case 66
            case 74: {
              systemUserName_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000100;
              break;
            } // case 74
            case 80: {
              systemTicketDuration_ = input.readSInt32();
              bitField0_ |= 0x00000200;
              break;
            } // case 80
            case 88: {
              systemTicketRefresh_ = input.readSInt32();
              bitField0_ |= 0x00000400;
              break;
            } // case 88
            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 jwtIssuer_ = "";
    /**
     * string jwtIssuer = 1;
     * @return The jwtIssuer.
     */
    public java.lang.String getJwtIssuer() {
      java.lang.Object ref = jwtIssuer_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        jwtIssuer_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string jwtIssuer = 1;
     * @return The bytes for jwtIssuer.
     */
    public com.google.protobuf.ByteString
        getJwtIssuerBytes() {
      java.lang.Object ref = jwtIssuer_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        jwtIssuer_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string jwtIssuer = 1;
     * @param value The jwtIssuer to set.
     * @return This builder for chaining.
     */
    public Builder setJwtIssuer(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      jwtIssuer_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * string jwtIssuer = 1;
     * @return This builder for chaining.
     */
    public Builder clearJwtIssuer() {
      jwtIssuer_ = getDefaultInstance().getJwtIssuer();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * string jwtIssuer = 1;
     * @param value The bytes for jwtIssuer to set.
     * @return This builder for chaining.
     */
    public Builder setJwtIssuerBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      jwtIssuer_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private int jwtExpiry_ ;
    /**
     * sint32 jwtExpiry = 2;
     * @return The jwtExpiry.
     */
    @java.lang.Override
    public int getJwtExpiry() {
      return jwtExpiry_;
    }
    /**
     * sint32 jwtExpiry = 2;
     * @param value The jwtExpiry to set.
     * @return This builder for chaining.
     */
    public Builder setJwtExpiry(int value) {

      jwtExpiry_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * sint32 jwtExpiry = 2;
     * @return This builder for chaining.
     */
    public Builder clearJwtExpiry() {
      bitField0_ = (bitField0_ & ~0x00000002);
      jwtExpiry_ = 0;
      onChanged();
      return this;
    }

    private int jwtLimit_ ;
    /**
     * sint32 jwtLimit = 6;
     * @return The jwtLimit.
     */
    @java.lang.Override
    public int getJwtLimit() {
      return jwtLimit_;
    }
    /**
     * sint32 jwtLimit = 6;
     * @param value The jwtLimit to set.
     * @return This builder for chaining.
     */
    public Builder setJwtLimit(int value) {

      jwtLimit_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * sint32 jwtLimit = 6;
     * @return This builder for chaining.
     */
    public Builder clearJwtLimit() {
      bitField0_ = (bitField0_ & ~0x00000004);
      jwtLimit_ = 0;
      onChanged();
      return this;
    }

    private int jwtRefresh_ ;
    /**
     * sint32 jwtRefresh = 7;
     * @return The jwtRefresh.
     */
    @java.lang.Override
    public int getJwtRefresh() {
      return jwtRefresh_;
    }
    /**
     * sint32 jwtRefresh = 7;
     * @param value The jwtRefresh to set.
     * @return This builder for chaining.
     */
    public Builder setJwtRefresh(int value) {

      jwtRefresh_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * sint32 jwtRefresh = 7;
     * @return This builder for chaining.
     */
    public Builder clearJwtRefresh() {
      bitField0_ = (bitField0_ & ~0x00000008);
      jwtRefresh_ = 0;
      onChanged();
      return this;
    }

    private org.finos.tracdap.config.PluginConfig provider_;
    private com.google.protobuf.SingleFieldBuilder<
        org.finos.tracdap.config.PluginConfig, org.finos.tracdap.config.PluginConfig.Builder, org.finos.tracdap.config.PluginConfigOrBuilder> providerBuilder_;
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     * @return Whether the provider field is set.
     */
    public boolean hasProvider() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     * @return The provider.
     */
    public org.finos.tracdap.config.PluginConfig getProvider() {
      if (providerBuilder_ == null) {
        return provider_ == null ? org.finos.tracdap.config.PluginConfig.getDefaultInstance() : provider_;
      } else {
        return providerBuilder_.getMessage();
      }
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     */
    public Builder setProvider(org.finos.tracdap.config.PluginConfig value) {
      if (providerBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        provider_ = value;
      } else {
        providerBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     */
    public Builder setProvider(
        org.finos.tracdap.config.PluginConfig.Builder builderForValue) {
      if (providerBuilder_ == null) {
        provider_ = builderForValue.build();
      } else {
        providerBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     */
    public Builder mergeProvider(org.finos.tracdap.config.PluginConfig value) {
      if (providerBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0) &&
          provider_ != null &&
          provider_ != org.finos.tracdap.config.PluginConfig.getDefaultInstance()) {
          getProviderBuilder().mergeFrom(value);
        } else {
          provider_ = value;
        }
      } else {
        providerBuilder_.mergeFrom(value);
      }
      if (provider_ != null) {
        bitField0_ |= 0x00000010;
        onChanged();
      }
      return this;
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     */
    public Builder clearProvider() {
      bitField0_ = (bitField0_ & ~0x00000010);
      provider_ = null;
      if (providerBuilder_ != null) {
        providerBuilder_.dispose();
        providerBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     */
    public org.finos.tracdap.config.PluginConfig.Builder getProviderBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getProviderFieldBuilder().getBuilder();
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     */
    public org.finos.tracdap.config.PluginConfigOrBuilder getProviderOrBuilder() {
      if (providerBuilder_ != null) {
        return providerBuilder_.getMessageOrBuilder();
      } else {
        return provider_ == null ?
            org.finos.tracdap.config.PluginConfig.getDefaultInstance() : provider_;
      }
    }
    /**
     * optional .tracdap.config.PluginConfig provider = 3;
     */
    private com.google.protobuf.SingleFieldBuilder<
        org.finos.tracdap.config.PluginConfig, org.finos.tracdap.config.PluginConfig.Builder, org.finos.tracdap.config.PluginConfigOrBuilder> 
        getProviderFieldBuilder() {
      if (providerBuilder_ == null) {
        providerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            org.finos.tracdap.config.PluginConfig, org.finos.tracdap.config.PluginConfig.Builder, org.finos.tracdap.config.PluginConfigOrBuilder>(
                getProvider(),
                getParentForChildren(),
                isClean());
        provider_ = null;
      }
      return providerBuilder_;
    }

    private boolean disableAuth_ ;
    /**
     * bool disableAuth = 4;
     * @return The disableAuth.
     */
    @java.lang.Override
    public boolean getDisableAuth() {
      return disableAuth_;
    }
    /**
     * bool disableAuth = 4;
     * @param value The disableAuth to set.
     * @return This builder for chaining.
     */
    public Builder setDisableAuth(boolean value) {

      disableAuth_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * bool disableAuth = 4;
     * @return This builder for chaining.
     */
    public Builder clearDisableAuth() {
      bitField0_ = (bitField0_ & ~0x00000020);
      disableAuth_ = false;
      onChanged();
      return this;
    }

    private boolean disableSigning_ ;
    /**
     * bool disableSigning = 5;
     * @return The disableSigning.
     */
    @java.lang.Override
    public boolean getDisableSigning() {
      return disableSigning_;
    }
    /**
     * bool disableSigning = 5;
     * @param value The disableSigning to set.
     * @return This builder for chaining.
     */
    public Builder setDisableSigning(boolean value) {

      disableSigning_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * bool disableSigning = 5;
     * @return This builder for chaining.
     */
    public Builder clearDisableSigning() {
      bitField0_ = (bitField0_ & ~0x00000040);
      disableSigning_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object systemUserId_ = "";
    /**
     * string systemUserId = 8;
     * @return The systemUserId.
     */
    public java.lang.String getSystemUserId() {
      java.lang.Object ref = systemUserId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        systemUserId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string systemUserId = 8;
     * @return The bytes for systemUserId.
     */
    public com.google.protobuf.ByteString
        getSystemUserIdBytes() {
      java.lang.Object ref = systemUserId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        systemUserId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string systemUserId = 8;
     * @param value The systemUserId to set.
     * @return This builder for chaining.
     */
    public Builder setSystemUserId(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      systemUserId_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * string systemUserId = 8;
     * @return This builder for chaining.
     */
    public Builder clearSystemUserId() {
      systemUserId_ = getDefaultInstance().getSystemUserId();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     * string systemUserId = 8;
     * @param value The bytes for systemUserId to set.
     * @return This builder for chaining.
     */
    public Builder setSystemUserIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      systemUserId_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }

    private java.lang.Object systemUserName_ = "";
    /**
     * string systemUserName = 9;
     * @return The systemUserName.
     */
    public java.lang.String getSystemUserName() {
      java.lang.Object ref = systemUserName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        systemUserName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string systemUserName = 9;
     * @return The bytes for systemUserName.
     */
    public com.google.protobuf.ByteString
        getSystemUserNameBytes() {
      java.lang.Object ref = systemUserName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        systemUserName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string systemUserName = 9;
     * @param value The systemUserName to set.
     * @return This builder for chaining.
     */
    public Builder setSystemUserName(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      systemUserName_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     * string systemUserName = 9;
     * @return This builder for chaining.
     */
    public Builder clearSystemUserName() {
      systemUserName_ = getDefaultInstance().getSystemUserName();
      bitField0_ = (bitField0_ & ~0x00000100);
      onChanged();
      return this;
    }
    /**
     * string systemUserName = 9;
     * @param value The bytes for systemUserName to set.
     * @return This builder for chaining.
     */
    public Builder setSystemUserNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      systemUserName_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }

    private int systemTicketDuration_ ;
    /**
     * sint32 systemTicketDuration = 10;
     * @return The systemTicketDuration.
     */
    @java.lang.Override
    public int getSystemTicketDuration() {
      return systemTicketDuration_;
    }
    /**
     * sint32 systemTicketDuration = 10;
     * @param value The systemTicketDuration to set.
     * @return This builder for chaining.
     */
    public Builder setSystemTicketDuration(int value) {

      systemTicketDuration_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     * sint32 systemTicketDuration = 10;
     * @return This builder for chaining.
     */
    public Builder clearSystemTicketDuration() {
      bitField0_ = (bitField0_ & ~0x00000200);
      systemTicketDuration_ = 0;
      onChanged();
      return this;
    }

    private int systemTicketRefresh_ ;
    /**
     * sint32 systemTicketRefresh = 11;
     * @return The systemTicketRefresh.
     */
    @java.lang.Override
    public int getSystemTicketRefresh() {
      return systemTicketRefresh_;
    }
    /**
     * sint32 systemTicketRefresh = 11;
     * @param value The systemTicketRefresh to set.
     * @return This builder for chaining.
     */
    public Builder setSystemTicketRefresh(int value) {

      systemTicketRefresh_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     * sint32 systemTicketRefresh = 11;
     * @return This builder for chaining.
     */
    public Builder clearSystemTicketRefresh() {
      bitField0_ = (bitField0_ & ~0x00000400);
      systemTicketRefresh_ = 0;
      onChanged();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:tracdap.config.AuthenticationConfig)
  }

  // @@protoc_insertion_point(class_scope:tracdap.config.AuthenticationConfig)
  private static final org.finos.tracdap.config.AuthenticationConfig DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.finos.tracdap.config.AuthenticationConfig();
  }

  public static org.finos.tracdap.config.AuthenticationConfig getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy