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

org.finos.tracdap.config.TenantConfig 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/platform.proto
// Protobuf Java Version: 4.28.2

package org.finos.tracdap.config;

/**
 * Protobuf type {@code tracdap.config.TenantConfig}
 */
public final class TenantConfig extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:tracdap.config.TenantConfig)
    TenantConfigOrBuilder {
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= */ "",
      TenantConfig.class.getName());
  }
  // Use TenantConfig.newBuilder() to construct.
  private TenantConfig(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private TenantConfig() {
    defaultBucket_ = "";
    defaultFormat_ = "";
  }

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

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

  private int bitField0_;
  public static final int DEFAULTBUCKET_FIELD_NUMBER = 1;
  @SuppressWarnings("serial")
  private volatile java.lang.Object defaultBucket_ = "";
  /**
   * optional string defaultBucket = 1;
   * @return Whether the defaultBucket field is set.
   */
  @java.lang.Override
  public boolean hasDefaultBucket() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * optional string defaultBucket = 1;
   * @return The defaultBucket.
   */
  @java.lang.Override
  public java.lang.String getDefaultBucket() {
    java.lang.Object ref = defaultBucket_;
    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();
      defaultBucket_ = s;
      return s;
    }
  }
  /**
   * optional string defaultBucket = 1;
   * @return The bytes for defaultBucket.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDefaultBucketBytes() {
    java.lang.Object ref = defaultBucket_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      defaultBucket_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEFAULTFORMAT_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private volatile java.lang.Object defaultFormat_ = "";
  /**
   * optional string defaultFormat = 2;
   * @return Whether the defaultFormat field is set.
   */
  @java.lang.Override
  public boolean hasDefaultFormat() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * optional string defaultFormat = 2;
   * @return The defaultFormat.
   */
  @java.lang.Override
  public java.lang.String getDefaultFormat() {
    java.lang.Object ref = defaultFormat_;
    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();
      defaultFormat_ = s;
      return s;
    }
  }
  /**
   * optional string defaultFormat = 2;
   * @return The bytes for defaultFormat.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDefaultFormatBytes() {
    java.lang.Object ref = defaultFormat_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      defaultFormat_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) != 0)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 1, defaultBucket_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 2, defaultFormat_);
    }
    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.GeneratedMessage.computeStringSize(1, defaultBucket_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, defaultFormat_);
    }
    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.TenantConfig)) {
      return super.equals(obj);
    }
    org.finos.tracdap.config.TenantConfig other = (org.finos.tracdap.config.TenantConfig) obj;

    if (hasDefaultBucket() != other.hasDefaultBucket()) return false;
    if (hasDefaultBucket()) {
      if (!getDefaultBucket()
          .equals(other.getDefaultBucket())) return false;
    }
    if (hasDefaultFormat() != other.hasDefaultFormat()) return false;
    if (hasDefaultFormat()) {
      if (!getDefaultFormat()
          .equals(other.getDefaultFormat())) 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 (hasDefaultBucket()) {
      hash = (37 * hash) + DEFAULTBUCKET_FIELD_NUMBER;
      hash = (53 * hash) + getDefaultBucket().hashCode();
    }
    if (hasDefaultFormat()) {
      hash = (37 * hash) + DEFAULTFORMAT_FIELD_NUMBER;
      hash = (53 * hash) + getDefaultFormat().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.finos.tracdap.config.TenantConfig parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config.TenantConfig 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.TenantConfig parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config.TenantConfig 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.TenantConfig parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config.TenantConfig parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.finos.tracdap.config.TenantConfig parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.finos.tracdap.config.TenantConfig 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.TenantConfig parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.finos.tracdap.config.TenantConfig 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.TenantConfig parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.finos.tracdap.config.TenantConfig 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.TenantConfig 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.TenantConfig}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder implements
      // @@protoc_insertion_point(builder_implements:tracdap.config.TenantConfig)
      org.finos.tracdap.config.TenantConfigOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.finos.tracdap.config.Platform.internal_static_tracdap_config_TenantConfig_descriptor;
    }

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

    // Construct using org.finos.tracdap.config.TenantConfig.newBuilder()
    private Builder() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      defaultBucket_ = "";
      defaultFormat_ = "";
      return this;
    }

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

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

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

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

    private void buildPartial0(org.finos.tracdap.config.TenantConfig result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.defaultBucket_ = defaultBucket_;
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.defaultFormat_ = defaultFormat_;
        to_bitField0_ |= 0x00000002;
      }
      result.bitField0_ |= to_bitField0_;
    }

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

    public Builder mergeFrom(org.finos.tracdap.config.TenantConfig other) {
      if (other == org.finos.tracdap.config.TenantConfig.getDefaultInstance()) return this;
      if (other.hasDefaultBucket()) {
        defaultBucket_ = other.defaultBucket_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.hasDefaultFormat()) {
        defaultFormat_ = other.defaultFormat_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      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: {
              defaultBucket_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              defaultFormat_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            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 defaultBucket_ = "";
    /**
     * optional string defaultBucket = 1;
     * @return Whether the defaultBucket field is set.
     */
    public boolean hasDefaultBucket() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * optional string defaultBucket = 1;
     * @return The defaultBucket.
     */
    public java.lang.String getDefaultBucket() {
      java.lang.Object ref = defaultBucket_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        defaultBucket_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * optional string defaultBucket = 1;
     * @return The bytes for defaultBucket.
     */
    public com.google.protobuf.ByteString
        getDefaultBucketBytes() {
      java.lang.Object ref = defaultBucket_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        defaultBucket_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * optional string defaultBucket = 1;
     * @param value The defaultBucket to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultBucket(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      defaultBucket_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * optional string defaultBucket = 1;
     * @return This builder for chaining.
     */
    public Builder clearDefaultBucket() {
      defaultBucket_ = getDefaultInstance().getDefaultBucket();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * optional string defaultBucket = 1;
     * @param value The bytes for defaultBucket to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultBucketBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      defaultBucket_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object defaultFormat_ = "";
    /**
     * optional string defaultFormat = 2;
     * @return Whether the defaultFormat field is set.
     */
    public boolean hasDefaultFormat() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * optional string defaultFormat = 2;
     * @return The defaultFormat.
     */
    public java.lang.String getDefaultFormat() {
      java.lang.Object ref = defaultFormat_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        defaultFormat_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * optional string defaultFormat = 2;
     * @return The bytes for defaultFormat.
     */
    public com.google.protobuf.ByteString
        getDefaultFormatBytes() {
      java.lang.Object ref = defaultFormat_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        defaultFormat_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * optional string defaultFormat = 2;
     * @param value The defaultFormat to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultFormat(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      defaultFormat_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * optional string defaultFormat = 2;
     * @return This builder for chaining.
     */
    public Builder clearDefaultFormat() {
      defaultFormat_ = getDefaultInstance().getDefaultFormat();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * optional string defaultFormat = 2;
     * @param value The bytes for defaultFormat to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultFormatBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      defaultFormat_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

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

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

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

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy