text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/appengine/v1/version.proto

package com.google.appengine.v1;

/**
 *
 *
 *

 * [Cloud Endpoints](https://cloud.google.com/endpoints) configuration.
 * The Endpoints API Service provides tooling for serving Open API and gRPC
 * endpoints via an NGINX proxy. Only valid for App Engine Flexible environment
 * deployments.
 * The fields here refer to the name and configuration ID of a "service"
 * resource in the [Service Management API](https://cloud.google.com/service-management/overview).
 *

 *
 * Protobuf type {@code google.appengine.v1.EndpointsApiService}
 */
public final class EndpointsApiService extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.appengine.v1.EndpointsApiService)
    EndpointsApiServiceOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use EndpointsApiService.newBuilder() to construct.
  private EndpointsApiService(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private EndpointsApiService() {
    name_ = "";
    configId_ = "";
    rolloutStrategy_ = 0;
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.appengine.v1.VersionProto
        .internal_static_google_appengine_v1_EndpointsApiService_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.appengine.v1.VersionProto
        .internal_static_google_appengine_v1_EndpointsApiService_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.appengine.v1.EndpointsApiService.class,
            com.google.appengine.v1.EndpointsApiService.Builder.class);
  }

  /**
   *
   *
   *

   * Available rollout strategies.
   *

   *
   * Protobuf enum {@code google.appengine.v1.EndpointsApiService.RolloutStrategy}
   */
  public enum RolloutStrategy implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     *

     * Not specified. Defaults to `FIXED`.
     *

     *
     * UNSPECIFIED_ROLLOUT_STRATEGY = 0;
     */
    UNSPECIFIED_ROLLOUT_STRATEGY(0),
    /**
     *
     *
     *

     * Endpoints service configuration ID will be fixed to the configuration ID
     * specified by `config_id`.
     *

     *
     * FIXED = 1;
     */
    FIXED(1),
    /**
     *
     *
     *

     * Endpoints service configuration ID will be updated with each rollout.
     *

     *
     * MANAGED = 2;
     */
    MANAGED(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     *

     * Not specified. Defaults to `FIXED`.
     *

     *
     * UNSPECIFIED_ROLLOUT_STRATEGY = 0;
     */
    public static final int UNSPECIFIED_ROLLOUT_STRATEGY_VALUE = 0;
    /**
     *
     *
     *

     * Endpoints service configuration ID will be fixed to the configuration ID
     * specified by `config_id`.
     *

     *
     * FIXED = 1;
     */
    public static final int FIXED_VALUE = 1;
    /**
     *
     *
     *

     * Endpoints service configuration ID will be updated with each rollout.
     *

     *
     * MANAGED = 2;
     */
    public static final int MANAGED_VALUE = 2;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static RolloutStrategy valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static RolloutStrategy forNumber(int value) {
      switch (value) {
        case 0:
          return UNSPECIFIED_ROLLOUT_STRATEGY;
        case 1:
          return FIXED;
        case 2:
          return MANAGED;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<RolloutStrategy> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<RolloutStrategy>
        internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<RolloutStrategy>() {
              public RolloutStrategy findValueByNumber(int number) {
                return RolloutStrategy.forNumber(number);
              }
            };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.appengine.v1.EndpointsApiService.getDescriptor().getEnumTypes().get(0);
    }

    private static final RolloutStrategy[] VALUES = values();

    public static RolloutStrategy valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

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

    // @@protoc_insertion_point(enum_scope:google.appengine.v1.EndpointsApiService.RolloutStrategy)
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   *
   *
   *

   * Endpoints service name which is the name of the "service" resource in the
   * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
   *

   *
   * string name = 1;
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   *

   * Endpoints service name which is the name of the "service" resource in the
   * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
   *

   *
   * string name = 1;
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CONFIG_ID_FIELD_NUMBER = 2;
  private volatile java.lang.Object configId_;
  /**
   *
   *
   *

   * Endpoints service configuration ID as specified by the Service Management
   * API. For example "2016-09-19r1".
   * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
   * This means that Endpoints starts up with a particular configuration ID.
   * When a new configuration is rolled out, Endpoints must be given the new
   * configuration ID. The `config_id` field is used to give the configuration
   * ID and is required in this case.
   * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
   * When using this, Endpoints fetches the latest configuration and does not
   * need the configuration ID. In this case, `config_id` must be omitted.
   *

   *
   * string config_id = 2;
   *
   * @return The configId.
   */
  @java.lang.Override
  public java.lang.String getConfigId() {
    java.lang.Object ref = configId_;
    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();
      configId_ = s;
      return s;
    }
  }
  /**
   *
   *
   *

   * Endpoints service configuration ID as specified by the Service Management
   * API. For example "2016-09-19r1".
   * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
   * This means that Endpoints starts up with a particular configuration ID.
   * When a new configuration is rolled out, Endpoints must be given the new
   * configuration ID. The `config_id` field is used to give the configuration
   * ID and is required in this case.
   * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
   * When using this, Endpoints fetches the latest configuration and does not
   * need the configuration ID. In this case, `config_id` must be omitted.
   *

   *
   * string config_id = 2;
   *
   * @return The bytes for configId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getConfigIdBytes() {
    java.lang.Object ref = configId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      configId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ROLLOUT_STRATEGY_FIELD_NUMBER = 3;
  private int rolloutStrategy_;
  /**
   *
   *
   *

   * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
   * `MANAGED`, `config_id` must be omitted.
   *

   *
   * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3;
   *
   * @return The enum numeric value on the wire for rolloutStrategy.
   */
  @java.lang.Override
  public int getRolloutStrategyValue() {
    return rolloutStrategy_;
  }
  /**
   *
   *
   *

   * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
   * `MANAGED`, `config_id` must be omitted.
   *

   *
   * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3;
   *
   * @return The rolloutStrategy.
   */
  @java.lang.Override
  public com.google.appengine.v1.EndpointsApiService.RolloutStrategy getRolloutStrategy() {
    @SuppressWarnings("deprecation")
    com.google.appengine.v1.EndpointsApiService.RolloutStrategy result =
        com.google.appengine.v1.EndpointsApiService.RolloutStrategy.valueOf(rolloutStrategy_);
    return result == null
        ? com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNRECOGNIZED
        : result;
  }

  public static final int DISABLE_TRACE_SAMPLING_FIELD_NUMBER = 4;
  private boolean disableTraceSampling_;
  /**
   *
   *
   *

   * Enable or disable trace sampling. By default, this is set to false for
   * enabled.
   *

   *
   * bool disable_trace_sampling = 4;
   *
   * @return The disableTraceSampling.
   */
  @java.lang.Override
  public boolean getDisableTraceSampling() {
    return disableTraceSampling_;
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, configId_);
    }
    if (rolloutStrategy_
        != com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNSPECIFIED_ROLLOUT_STRATEGY
            .getNumber()) {
      output.writeEnum(3, rolloutStrategy_);
    }
    if (disableTraceSampling_ != false) {
      output.writeBool(4, disableTraceSampling_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, configId_);
    }
    if (rolloutStrategy_
        != com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNSPECIFIED_ROLLOUT_STRATEGY
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, rolloutStrategy_);
    }
    if (disableTraceSampling_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableTraceSampling_);
    }
    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 com.google.appengine.v1.EndpointsApiService)) {
      return super.equals(obj);
    }
    com.google.appengine.v1.EndpointsApiService other =
        (com.google.appengine.v1.EndpointsApiService) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getConfigId().equals(other.getConfigId())) return false;
    if (rolloutStrategy_ != other.rolloutStrategy_) return false;
    if (getDisableTraceSampling() != other.getDisableTraceSampling()) 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) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + CONFIG_ID_FIELD_NUMBER;
    hash = (53 * hash) + getConfigId().hashCode();
    hash = (37 * hash) + ROLLOUT_STRATEGY_FIELD_NUMBER;
    hash = (53 * hash) + rolloutStrategy_;
    hash = (37 * hash) + DISABLE_TRACE_SAMPLING_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTraceSampling());
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.appengine.v1.EndpointsApiService parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.appengine.v1.EndpointsApiService parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.appengine.v1.EndpointsApiService parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.appengine.v1.EndpointsApiService parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.appengine.v1.EndpointsApiService parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.appengine.v1.EndpointsApiService parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

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

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

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

  public static com.google.appengine.v1.EndpointsApiService 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(com.google.appengine.v1.EndpointsApiService 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;
  }
  /**
   *
   *
   *

   * [Cloud Endpoints](https://cloud.google.com/endpoints) configuration.
   * The Endpoints API Service provides tooling for serving Open API and gRPC
   * endpoints via an NGINX proxy. Only valid for App Engine Flexible environment
   * deployments.
   * The fields here refer to the name and configuration ID of a "service"
   * resource in the [Service Management API](https://cloud.google.com/service-management/overview).
   *

   *
   * Protobuf type {@code google.appengine.v1.EndpointsApiService}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.appengine.v1.EndpointsApiService)
      com.google.appengine.v1.EndpointsApiServiceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.appengine.v1.VersionProto
          .internal_static_google_appengine_v1_EndpointsApiService_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.appengine.v1.VersionProto
          .internal_static_google_appengine_v1_EndpointsApiService_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.appengine.v1.EndpointsApiService.class,
              com.google.appengine.v1.EndpointsApiService.Builder.class);
    }

    // Construct using com.google.appengine.v1.EndpointsApiService.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      name_ = "";

      configId_ = "";

      rolloutStrategy_ = 0;

      disableTraceSampling_ = false;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.appengine.v1.VersionProto
          .internal_static_google_appengine_v1_EndpointsApiService_descriptor;
    }

    @java.lang.Override
    public com.google.appengine.v1.EndpointsApiService getDefaultInstanceForType() {
      return com.google.appengine.v1.EndpointsApiService.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.appengine.v1.EndpointsApiService build() {
      com.google.appengine.v1.EndpointsApiService result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.appengine.v1.EndpointsApiService buildPartial() {
      com.google.appengine.v1.EndpointsApiService result =
          new com.google.appengine.v1.EndpointsApiService(this);
      result.name_ = name_;
      result.configId_ = configId_;
      result.rolloutStrategy_ = rolloutStrategy_;
      result.disableTraceSampling_ = disableTraceSampling_;
      onBuilt();
      return result;
    }

    @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 com.google.appengine.v1.EndpointsApiService) {
        return mergeFrom((com.google.appengine.v1.EndpointsApiService) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.appengine.v1.EndpointsApiService other) {
      if (other == com.google.appengine.v1.EndpointsApiService.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getConfigId().isEmpty()) {
        configId_ = other.configId_;
        onChanged();
      }
      if (other.rolloutStrategy_ != 0) {
        setRolloutStrategyValue(other.getRolloutStrategyValue());
      }
      if (other.getDisableTraceSampling() != false) {
        setDisableTraceSampling(other.getDisableTraceSampling());
      }
      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:
              {
                name_ = input.readStringRequireUtf8();

                break;
              } // case 10
            case 18:
              {
                configId_ = input.readStringRequireUtf8();

                break;
              } // case 18
            case 24:
              {
                rolloutStrategy_ = input.readEnum();

                break;
              } // case 24
            case 32:
              {
                disableTraceSampling_ = input.readBool();

                break;
              } // case 32
            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 java.lang.Object name_ = "";
    /**
     *
     *
     *

     * Endpoints service name which is the name of the "service" resource in the
     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
     *

     *
     * string name = 1;
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * Endpoints service name which is the name of the "service" resource in the
     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
     *

     *
     * string name = 1;
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * Endpoints service name which is the name of the "service" resource in the
     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
     *

     *
     * string name = 1;
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      name_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Endpoints service name which is the name of the "service" resource in the
     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
     *

     *
     * string name = 1;
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Endpoints service name which is the name of the "service" resource in the
     * Service Management API. For example "myapi.endpoints.myproject.cloud.goog"
     *

     *
     * string name = 1;
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      name_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object configId_ = "";
    /**
     *
     *
     *

     * Endpoints service configuration ID as specified by the Service Management
     * API. For example "2016-09-19r1".
     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
     * This means that Endpoints starts up with a particular configuration ID.
     * When a new configuration is rolled out, Endpoints must be given the new
     * configuration ID. The `config_id` field is used to give the configuration
     * ID and is required in this case.
     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
     * When using this, Endpoints fetches the latest configuration and does not
     * need the configuration ID. In this case, `config_id` must be omitted.
     *

     *
     * string config_id = 2;
     *
     * @return The configId.
     */
    public java.lang.String getConfigId() {
      java.lang.Object ref = configId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        configId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * Endpoints service configuration ID as specified by the Service Management
     * API. For example "2016-09-19r1".
     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
     * This means that Endpoints starts up with a particular configuration ID.
     * When a new configuration is rolled out, Endpoints must be given the new
     * configuration ID. The `config_id` field is used to give the configuration
     * ID and is required in this case.
     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
     * When using this, Endpoints fetches the latest configuration and does not
     * need the configuration ID. In this case, `config_id` must be omitted.
     *

     *
     * string config_id = 2;
     *
     * @return The bytes for configId.
     */
    public com.google.protobuf.ByteString getConfigIdBytes() {
      java.lang.Object ref = configId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        configId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * Endpoints service configuration ID as specified by the Service Management
     * API. For example "2016-09-19r1".
     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
     * This means that Endpoints starts up with a particular configuration ID.
     * When a new configuration is rolled out, Endpoints must be given the new
     * configuration ID. The `config_id` field is used to give the configuration
     * ID and is required in this case.
     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
     * When using this, Endpoints fetches the latest configuration and does not
     * need the configuration ID. In this case, `config_id` must be omitted.
     *

     *
     * string config_id = 2;
     *
     * @param value The configId to set.
     * @return This builder for chaining.
     */
    public Builder setConfigId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      configId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Endpoints service configuration ID as specified by the Service Management
     * API. For example "2016-09-19r1".
     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
     * This means that Endpoints starts up with a particular configuration ID.
     * When a new configuration is rolled out, Endpoints must be given the new
     * configuration ID. The `config_id` field is used to give the configuration
     * ID and is required in this case.
     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
     * When using this, Endpoints fetches the latest configuration and does not
     * need the configuration ID. In this case, `config_id` must be omitted.
     *

     *
     * string config_id = 2;
     *
     * @return This builder for chaining.
     */
    public Builder clearConfigId() {

      configId_ = getDefaultInstance().getConfigId();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Endpoints service configuration ID as specified by the Service Management
     * API. For example "2016-09-19r1".
     * By default, the rollout strategy for Endpoints is `RolloutStrategy.FIXED`.
     * This means that Endpoints starts up with a particular configuration ID.
     * When a new configuration is rolled out, Endpoints must be given the new
     * configuration ID. The `config_id` field is used to give the configuration
     * ID and is required in this case.
     * Endpoints also has a rollout strategy called `RolloutStrategy.MANAGED`.
     * When using this, Endpoints fetches the latest configuration and does not
     * need the configuration ID. In this case, `config_id` must be omitted.
     *

     *
     * string config_id = 2;
     *
     * @param value The bytes for configId to set.
     * @return This builder for chaining.
     */
    public Builder setConfigIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      configId_ = value;
      onChanged();
      return this;
    }

    private int rolloutStrategy_ = 0;
    /**
     *
     *
     *

     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
     * `MANAGED`, `config_id` must be omitted.
     *

     *
     * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3;
     *
     * @return The enum numeric value on the wire for rolloutStrategy.
     */
    @java.lang.Override
    public int getRolloutStrategyValue() {
      return rolloutStrategy_;
    }
    /**
     *
     *
     *

     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
     * `MANAGED`, `config_id` must be omitted.
     *

     *
     * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3;
     *
     * @param value The enum numeric value on the wire for rolloutStrategy to set.
     * @return This builder for chaining.
     */
    public Builder setRolloutStrategyValue(int value) {

      rolloutStrategy_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
     * `MANAGED`, `config_id` must be omitted.
     *

     *
     * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3;
     *
     * @return The rolloutStrategy.
     */
    @java.lang.Override
    public com.google.appengine.v1.EndpointsApiService.RolloutStrategy getRolloutStrategy() {
      @SuppressWarnings("deprecation")
      com.google.appengine.v1.EndpointsApiService.RolloutStrategy result =
          com.google.appengine.v1.EndpointsApiService.RolloutStrategy.valueOf(rolloutStrategy_);
      return result == null
          ? com.google.appengine.v1.EndpointsApiService.RolloutStrategy.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     *

     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
     * `MANAGED`, `config_id` must be omitted.
     *

     *
     * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3;
     *
     * @param value The rolloutStrategy to set.
     * @return This builder for chaining.
     */
    public Builder setRolloutStrategy(
        com.google.appengine.v1.EndpointsApiService.RolloutStrategy value) {
      if (value == null) {
        throw new NullPointerException();
      }

      rolloutStrategy_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Endpoints rollout strategy. If `FIXED`, `config_id` must be specified. If
     * `MANAGED`, `config_id` must be omitted.
     *

     *
     * .google.appengine.v1.EndpointsApiService.RolloutStrategy rollout_strategy = 3;
     *
     * @return This builder for chaining.
     */
    public Builder clearRolloutStrategy() {

      rolloutStrategy_ = 0;
      onChanged();
      return this;
    }

    private boolean disableTraceSampling_;
    /**
     *
     *
     *

     * Enable or disable trace sampling. By default, this is set to false for
     * enabled.
     *

     *
     * bool disable_trace_sampling = 4;
     *
     * @return The disableTraceSampling.
     */
    @java.lang.Override
    public boolean getDisableTraceSampling() {
      return disableTraceSampling_;
    }
    /**
     *
     *
     *

     * Enable or disable trace sampling. By default, this is set to false for
     * enabled.
     *

     *
     * bool disable_trace_sampling = 4;
     *
     * @param value The disableTraceSampling to set.
     * @return This builder for chaining.
     */
    public Builder setDisableTraceSampling(boolean value) {

      disableTraceSampling_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Enable or disable trace sampling. By default, this is set to false for
     * enabled.
     *

     *
     * bool disable_trace_sampling = 4;
     *
     * @return This builder for chaining.
     */
    public Builder clearDisableTraceSampling() {

      disableTraceSampling_ = false;
      onChanged();
      return this;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.appengine.v1.EndpointsApiService)
  }

  // @@protoc_insertion_point(class_scope:google.appengine.v1.EndpointsApiService)
  private static final com.google.appengine.v1.EndpointsApiService DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.appengine.v1.EndpointsApiService();
  }

  public static com.google.appengine.v1.EndpointsApiService getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.appengine.v1.EndpointsApiService getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
local gmod_version_required = 145;
if ( VERSION < gmod_version_required ) then
	error("SB CORE: Your gmod is out of date: found version ", VERSION, "required ", gmod_version_required)
end

local net = net

--Variable Declarations
local CAF2 = {}
CAF = CAF2;
local CAF3 = {}
CAF2.StartingUp = false;
CAF2.HasInternet = false;
CAF2.InternetEnabled = true --Change this to false if you crash when CAF2 loads clientside

surface.CreateFont( "GModCAFNotify", {font = "verdana", size = 15, weight = 600} )

--nederlands, english

local DEBUG = true
CAF3.DEBUG = DEBUG;
local Addons = {}
CAF3.Addons = Addons

--Derma stuff
local MainInfoMenuData = nil;
--local MainStatusMenuData = nil;
--local TopFrame = nil;
--local TopFrameHasText = false;
--local TopLabel = nil
--End Derma stuff

local addonlevel = {}
CAF3.addonlevel = addonlevel
addonlevel[1] = {}
addonlevel[2] = {}
addonlevel[3] = {}
addonlevel[4] = {}
addonlevel[5] = {}

local hooks = {}
CAF3.hooks = hooks;
hooks["think"] = {}
hooks["think2"] = {}
hooks["think3"] = {}
hooks["OnAddonDestruct"] = {}
hooks["OnAddonConstruct"] = {}
hooks["OnAddonExtraOptionChange"] = {}

local function ErrorOffStuff(String)
	Msg( "----------------------------------------------------------------------\n" )
	Msg("-----------Custom Addon Management Framework Error----------\n")
	Msg("----------------------------------------------------------------------\n")
	Msg(tostring(String).."\n")
end

CAF2.CAF3 = CAF3;
include("caf/core/shared/sh_general_caf.lua")
CAF2.CAF3 = nil;

-- Synchronize language with gmod interface
CAF2.SaveVar("CAF_LANGUAGE", GetConVar("gmod_language"):GetString())

local function OnAddonDestruct(name)
	if not name then return end
	if(CAF2.GetAddonStatus(name)) then
		local ok, err = pcall(Addons[name].__Destruct);
		if not ok then
			CAF2.WriteToDebugFile("CAF_Destruct", "Couldn't call destructor for "..name .. " error: " .. err .."\n")
			AddPopup(CAF.GetLangVar("Error unloading Addon")..": " .. CAF.GetLangVar(name), "top", CAF2.colors.red);
		else
			if err then
				AddPopup(CAF.GetLangVar("Addon")..": " .. CAF.GetLangVar(name) .. " "..CAF.GetLangVar("got disabled"),"top", CAF2.colors.green);
			else
				AddPopup(CAF.GetLangVar("An error occured when trying to disable Addon")..": " .. CAF.GetLangVar(name),"top", CAF2.colors.red);
			end
		end
	end
	if not CAF2.StartingUp then
		for k , v in pairs(hooks["OnAddonDestruct"]) do
			local ok, err = pcall(v, name)
			if not ok then
				CAF2.WriteToDebugFile("CAF_Hooks", "OnAddonDestruct Error " .. err .. "\n")
			end
		end
		CAF2.RefreshMainMenu();
	end
end

local function OnAddonConstruct(name)
	if not name then return end
	if(not CAF2.GetAddonStatus(name)) then
		if Addons[name] then
			local test, err = pcall(Addons[name].__Construct);
			if not test then
				CAF2.WriteToDebugFile("CAF_Construct", "Couldn't call constructor for "..name .. " error: " .. err .."\n")
				AddPopup(CAF.GetLangVar("Error loading Addon")..": " .. CAF.GetLangVar(name), "top", CAF2.colors.red);
			else
				if err then
					AddPopup(CAF.GetLangVar("Addon")..": " .. CAF.GetLangVar(name) .. " "..CAF.GetLangVar("got enabled"),"top", CAF2.colors.green);
				else
					AddPopup(CAF.GetLangVar("An error occured when trying to enable Addon")..": " .. CAF.GetLangVar(name),"top", CAF2.colors.red);
				end
			end
		end
	end
	if not CAF2.StartingUp then
		for k , v in pairs(hooks["OnAddonConstruct"]) do
			local ok, err = pcall(v, name)
			if not ok then
				CAF2.WriteToDebugFile("CAF_Hooks", "OnAddonConstruct Error " .. err .. "\n")
			end
		end
		CAF2.RefreshMainMenu();
	end
end

local function OnAddonExtraOptionChange(AddonName, OptionName, NewStatus)
	if not AddonName or not OptionName then return nil, CAF.GetLangVar("Missing Argument") end
	for k , v in pairs(hooks["OnAddonExtraOptionChange"]) do
		local ok, err = pcall(v, AddonName, OptionName, NewStatus)
		if not ok then
			CAF2.WriteToDebugFile("CAF_Hooks", "OnAddonExtraOptionChange Error " .. err .. "\n")
		end
	end
end

--Global function

function CAF2.WriteToDebugFile(filename, message)
	if not filename or not message then return nil , CAF.GetLangVar("Missing Argument") end
	if DEBUG then
		ErrorNoHalt("Filename: "..tostring(filename)..", Message: "..tostring(message).."\n")
	end
	local contents = file.Read("CAF_Debug/client/"..filename..".txt")
	contents = contents or ""
	contents = contents .. message
	file.Write("CAF_Debug/client/"..filename..".txt", contents)
end

function CAF2.ClearDebugFile(filename)
	if not filename then return nil , CAF.GetLangVar("Missing Argument") end
	local contents = file.Read("CAF_Debug/client/"..filename..".txt")
	contents = contents or ""
	file.Write("CAF_Debug/client/"..filename..".txt", "")
	return content
end

--Server-Client Synchronisation
function CAF2.ConstructAddon(len, client)
    local name = net.ReadString()
    OnAddonConstruct(name)
    --RunConsoleCommand("Main_CAF_Menu");
end
net.Receive("CAF_Addon_Construct", CAF2.ConstructAddon)

function CAF2.DestructAddon(len, client)
	local name = net.ReadString()
	OnAddonDestruct(name)
	--RunConsoleCommand("Main_CAF_Menu");
end
net.Receive("CAF_Addon_Destruct", CAF2.DestructAddon)

function CAF2.Start(len, client)
	CAF2.StartingUp = true;
end
net.Receive("CAF_Start_true", CAF2.Start)

function CAF2.endStart(len, client)
	CAF2.StartingUp = false;
end
net.Receive("CAF_Start_false", CAF2.endStart)

local displaypopups = {}
local popups = {}

--PopupSettings
local Font	= "GModCAFNotify"
--End popupsettings

local function DrawPopups()
	if GetConVarString('cl_hudversion') == "" then
		if displaypopups["top"] then
			local obj = displaypopups["top"]
			surface.SetFont( Font )
			local width, height = surface.GetTextSize(obj.message)
			if width == nil or height == nil then return end
			width = width + 16
			height = height + 16
			local left = (ScrW()/2)- (width/2);
			local top = 0;
			draw.RoundedBox( 4, left-1 , top, width+2, height+2, obj.color)
			draw.RoundedBox( 4, left , top+1, width, height, Color(0, 0, 0, 150))
			draw.DrawText(obj.message,	Font, left + 8, top + 9, obj.color, 0 )
		end
		if displaypopups["left"] then
			local obj = displaypopups["left"]
			surface.SetFont( Font )
			local width, height = surface.GetTextSize(obj.message)
			if width == nil or height == nil then return end
			width = width + 16
			height = height + 16
			local left = 0
			local top = ScrH() * 2/3;
			draw.RoundedBox( 4, left , top-1, width+2, height+2, obj.color)
			draw.RoundedBox( 4, left+1 , top, width, height, Color(0, 0, 0, 150))
			draw.DrawText(obj.message,	Font, left + 9, top + 8, obj.color, 0 )
		end
		if displaypopups["right"] then
			local obj = displaypopups["right"]
			surface.SetFont( Font )
			local width, height = surface.GetTextSize(obj.message)
			if width == nil or height == nil then return end
			width = width + 16
			height = height + 16
			local left = ScrW()- width;
			local top = ScrH() * 2/3;
			draw.RoundedBox( 4, left-1 , top-1, width + 2, height + 2, obj.color)
			draw.RoundedBox( 4, left , top, width, height, Color(0, 0, 0, 150))
			draw.DrawText(obj.message,	Font, left + 8, top + 8, obj.color, 0 )
		end
		if displaypopups["bottom"] then
			local obj = displaypopups["bottom"]
			surface.SetFont( Font )
			local width, height = surface.GetTextSize(obj.message)
			if width == nil or height == nil then return end
			width = width + 16
			height = height + 16
			local left = (ScrW()/2)- (width/2);
			local top = ScrH() - height
			draw.RoundedBox( 4, left-1 , top-2, width+2, height+2, obj.color)
			draw.RoundedBox( 4, left , top - 1, width, height, Color(0, 0, 0, 150))
			draw.DrawText(obj.message,	Font, left + 8, top + 7, obj.color, 0 )
		end
	end
end
hook.Add("HUDPaint", "CAF_Core_POPUPS", DrawPopups)

local function MessageOfTheDay()
	return "Welcome to CAF\nYou are using version "..CAF2.version;
end

--local function ShowNextTopMessage()
local function ShowNextPopupMessage()
	local ply = LocalPlayer();
	local locations = {"top", "left", "right", "bottom"};
	for k, v in pairs(locations) do
		if displaypopups[v] == nil and popups[v] and table.Count(popups[v]) > 0 then
			local obj = popups[v][1];
			table.remove(popups[v], 1);
			if ply and ply.ChatPrint then
				ply:ChatPrint(obj.message.."\n")
			else
				Msg(obj.message.."\n")
			end
			displaypopups[v] = obj;
			timer.Simple(obj.time, function() ClearPopup(obj) end);
		end
	end
end

--function ClearTopTextMessage(obj)
function ClearPopup(obj)
	if obj then
		displaypopups[obj.location] = nil;
	end
	if table.Count(popups[obj.location]) > 0 then
		ShowNextPopupMessage();
	end
end

local MessageLog = {}

--function AddTopInfoMessage(message)
function AddPopup(message, location, color, displaytime)
	local obj = {}
	local allowedlocations = {"top", "left", "right", "bottom"};
	location = location or "top";
	if not table.HasValue(allowedlocations, location) then
		location = "top"
	end
	obj.message = message or "Corrupt Message";
	obj.location = location or "top"
	obj.time = displaytime or 1;
	obj.color = color or CAF2.colors.white;
	if not popups[location] then
		popups[location] = {}
	end
	table.insert(popups[location], obj);
	table.insert(MessageLog, obj);
	ShowNextPopupMessage();
end

local function GetHelpPanel(frame)
	local panel = vgui.Create("DPanel", frame)
	panel:StretchToParent( 6, 80, 6, 6 )

	local LeftTree = vgui.Create( "DTree", panel )
	LeftTree:SetSize( 200, panel:GetTall() - 2)
	LeftTree:SetPos(15, 1);

	local RightPanel = vgui.Create("DPanel", panel )
	RightPanel:SetSize(panel:GetWide() - 230, panel:GetTall() - 2);
	RightPanel:SetPos(220, 1);

	if not MainInfoMenuData then
		MainInfoMenuData = {}
		if table.Count(Addons) > 0 then
			for k, v in pairs(Addons) do
				local ok, err = pcall(v.GetMenu)
				if ok then
					if err then
						MainInfoMenuData[k] = err
					end
				end
			end
		end
	end
	LeftTree:Clear()
	--Fill the Tree
	if table.Count(MainInfoMenuData) > 0 then
		for k, v in pairs(MainInfoMenuData) do
			--Addon Info
			local title = k;
			local node = LeftTree:AddNode(title)
			--node.Icon:SetImage(devlist.icon)
			for l, w in pairs(v) do
				--Sub Menu's
				local Node = node:AddNode(l)
				function Node.DoClick(btn)
					if(w.hasmenu) then
						--To Implement
					elseif (CAF2.HasInternet and w.interneturl) then
						local HTMLTest = vgui.Create("HTML", RightPanel)
						HTMLTest:StretchToParent( 10, 10, 10, 10 )
						HTMLTest:OpenURL(w.interneturl)
					elseif(w.localurl) then
						local HTMLTest = vgui.Create("HTML", RightPanel)
						HTMLTest:StretchToParent( 10, 10, 10, 10 )
						HTMLTest:SetHTML(file.Read(w.localurl))
					end
				end
				function Node.DoRightClick(btn)
					-- To Implement
				end
				for m, x in pairs(w) do
					--Links in submenu
					local cnode = Node:AddNode(m)
					function cnode.DoClick(btn)
						if(x.hasmenu) then
							--To Implement
						elseif (CAF2.HasInternet and x.interneturl) then
							RightPanel:Clear();
							local HTMLTest = vgui.Create("HTML", RightPanel)
							HTMLTest:StretchToParent( 10, 10, 10, 10 )
							HTMLTest:OpenURL(x.interneturl)
						elseif(x.localurl) then
							RightPanel:Clear();
							local HTMLTest = vgui.Create("HTML", RightPanel)
							HTMLTest:StretchToParent( 10, 10, 10, 10 )
							HTMLTest:SetHTML(file.Read(x.localurl))
						end
					end
					function cnode.DoRightClick(btn)
						-- To Implement
					end
				end
			end
		end
	end
	return panel
end

function CAF2.Notice(message, title)
	if not message then return false end;
	if not title then title = "Notice" end
	local dfpopup = vgui.Create("DFrame")
	dfpopup:SetDeleteOnClose()
	dfpopup:SetDraggable( false )
	dfpopup:SetTitle(title)

	local lbl = vgui.Create("DLabel", dfpopup)
	lbl:SetPos(10, 25);
	lbl:SetText(message);
	lbl:SizeToContents();

	dfpopup:SetSize(lbl:GetWide() + 4, lbl:GetTall() + 25);
	dfpopup:Center();
	dfpopup:MakePopup();
	return true;
end

local function GetClientMenu(contentpanel)
	--Create clientside menu here => Language settings, ...
	local panel = vgui.Create("DPanel", contentpanel)
	local x = 10;
	local y = 0;

	--Title
	local lblTitle = vgui.Create("DLabel", panel)
	lblTitle:SetText(CAF2.GetLangVar("Clientside CAF Options"));
	lblTitle:SizeToContents()
	lblTitle:SetPos(x, y);

	y = y + 20;
	-- Language Selection
	local lbl = vgui.Create("DLabel", panel)
	lbl:SetText(CAF2.GetLangVar("Language")..":");
	lbl:SizeToContents()
	lbl:SetPos(x, y);

	x = x + lbl:GetWide() + 2;

	--[[local selection = vgui.Create("DMultiChoice", panel)
	selection:SetPos(x, y);
	for k, v in pairs(CAF.LANGUAGE) do
		selection:AddChoice( k )
	end
	function selection:OnSelect( index, value, data )
		CAF2.currentlanguage = value;
		CAF2.SaveVar("CAF_LANGUAGE", value)
		CAF2.Notice(CAF2.GetLangVar("Some Language Changes will only Show after a map reload!"));
	end
	selection:SetWide( 150 )

	y = y + 15
	x = x - lbl:GetWide() - 5
	--Other options here]]

	panel:SetSize(contentpanel:GetWide(), y + 10);
	return panel;
end

local function AddCAFInfoToStatus(List)

	local descriptiontxt = nil
	if GetDescription then
		descriptiontxt = GetDescription()
	end

	local v = {}
	function v.GetVersion()
		return CAF2.version, "Core";
	end

	function v.GetStatus()
		return true;
	end

	function v.CanChangeStatus()
		return false
	end

	function v.GetDisplayImage()
		return "icon16/application.png"; --Change to something else later on?
	end

	local cat = vgui.Create("DCAFCollapsibleCategory")
	cat:Setup("Custom Addon Framework", v);
	--cat:SetExtraButtonAction(function() frame:Close()  end)

	local contentpanel = vgui.Create("DPanelList", cat)
	contentpanel:SetWide(List:GetWide())
	local clientMenu = nil;
	if GetClientMenu then
		clientMenu = GetClientMenu(contentpanel);
	end
	local serverMenu = nil;
	if GetServerMenu then
		serverMenu = GetServerMenu(contentpanel);
	end

	--Start Add Custom Stuff
	local x = 0;
	local y = 0;
	local ply = LocalPlayer();
	--Version Check
	local versionupdatetext = vgui.Create("DLabel", contentpanel)
	versionupdatetext:SetPos(x + 10, y)
	versionupdatetext:SetText(CAF.GetLangVar("No Update Information Available"))
	versionupdatetext:SetTextColor( Color(200,200,0,200) )
	versionupdatetext:SizeToContents()

	y = y + 30;

	--ServerMenu
	if serverMenu then
		serverMenu:SetPos(x, y)
		y = y + serverMenu:GetTall() + 15;
	end
	--Clientside menu
	if clientMenu then
		clientMenu:SetPos(x, y)
		y = y + clientMenu:GetTall() + 15;
	end

	--Description
	if descriptiontxt ~= nil then
		local list = vgui.Create("DPanelList",contentpanel)
		list:SetPos(x, y);
		local size = 1;
		list:SetPadding(10)
		--Description Blank Line
		lab = vgui.Create("DLabel", list)
		lab:SetText(CAF.GetLangVar("Description")..":")
		lab:SizeToContents()
		list:AddItem(lab)
		size = size + 1;
		--Description
		for k, v in pairs(descriptiontxt) do
			lab = vgui.Create("DLabel", list)
			lab:SetText(v)
			lab:SizeToContents()
			list:AddItem(lab)
			size = size + 1;
		end
		list:SetSize(List:GetWide()-10, 15 * size)
		contentpanel:SizeToContents()
		y = y + (15 * size) + 15
	end
	contentpanel:SetTall(y);
	--End Add Custom Stuff
	cat:SetContents(contentpanel)
	cat:SizeToContents()
	cat:InvalidateLayout()
	cat:SetExpanded(true)
	List:AddItem(cat)
end

local function GetStatusPanel(frame)
	local panel = vgui.Create("DPanel", frame)
	panel:StretchToParent( 6, 36, 6, 6 )
	local List = vgui.Create("DPanelList", panel)
	List:EnableHorizontal(false)
	List:EnableVerticalScrollbar(true)
	List:SetPadding(5)
	List:SetSpacing(5)
	List:StretchToParent( 2, 2, 2, 2 )
	List:SetPos(2, 2)

	local iteration = 0
	AddCAFInfoToStatus(List);

	iteration = iteration + 1;

	if table.Count(Addons) > 0 then
		for k,v in pairs( Addons ) do
			if v.IsVisible == nil or v.IsVisible() then
				iteration = iteration + 1;

				local descriptiontxt = nil
				if v.GetDescription then
					descriptiontxt = v.GetDescription()
				--else
				--	descriptiontxt = {CAF.GetLangVar("No Description")};
				end

				local cat = vgui.Create("DCAFCollapsibleCategory")
				cat:Setup(k, v);
				--cat:SetExtraButtonAction(function() frame:Close()  end)

				local contentpanel = vgui.Create("DPanelList", cat)
				contentpanel:SetWide(List:GetWide())
				local clientMenu = nil;
				if v.GetClientMenu then
					clientMenu = v.GetClientMenu(contentpanel);
				end
				local serverMenu = nil;
				if v.GetServerMenu then
					serverMenu = v.GetServerMenu(contentpanel);
				end

				--Start Add Custom Stuff
				local x = 0;
				local y = 0;
				local ply = LocalPlayer();
				--Version Check
				local versionupdatetext = vgui.Create("DLabel", contentpanel)
				versionupdatetext:SetPos(x + 10, y)
				versionupdatetext:SetText(CAF.GetLangVar("No Update Information Available"))
				versionupdatetext:SetTextColor( Color(200,200,0,200) )
				versionupdatetext:SizeToContents()

				y = y + 30;

				--ServerMenu
				if serverMenu then
					serverMenu:SetPos(x, y)
					y = y + serverMenu:GetTall() + 15;
				end
				--Clientside menu
				if clientMenu then
					clientMenu:SetPos(x, y)
					y = y + clientMenu:GetTall() + 15;
				end

				--Description
				if descriptiontxt ~= nil then
					local list = vgui.Create("DPanelList",contentpanel)
					list:SetPos(x, y);
					local size = 1;
					list:SetPadding(10)
					--Description Blank Line
					lab = vgui.Create("DLabel", list)
					lab:SetText(CAF.GetLangVar("Description")..":")
					lab:SizeToContents()
					list:AddItem(lab)
					size = size + 1;
					--Description
					for k, v in pairs(descriptiontxt) do
						lab = vgui.Create("DLabel", list)
						lab:SetText(v)
						lab:SizeToContents()
						list:AddItem(lab)
						size = size + 1;
					end
					list:SetSize(List:GetWide()-10, 15 * size)
					contentpanel:SizeToContents()
					y = y + (15 * size) + 15
				end
				contentpanel:SetTall(y);
				--End Add Custom Stuff
				cat:SetContents(contentpanel)
				cat:SizeToContents()
				cat:InvalidateLayout()
				--[[if iteration == 1 then
					cat:SetExpanded(true)
				else]]
					cat:SetExpanded(false)
				--end
				List:AddItem(cat)
			end
		end
	end
	return panel
end

function GetMessageLogPanel(frame)
	--TODO Create it
	local panel = vgui.Create("DPanel", frame)
	panel:StretchToParent( 6, 36, 6, 6 )
	local mylist = vgui.Create("DListView", panel)
	mylist:SetMultiSelect(false)
	mylist:SetPos(1,1)
	mylist:StretchToParent( 2, 2, 2, 2 ) --SetSize(panel:GetWide()- 2, panel:GetTall()-2)
	local colum =  mylist:AddColumn("Time")
	colum:SetFixedWidth(math.Round((mylist:GetWide() * (0.5/5))))
	colum =  mylist:AddColumn("Location")
	colum:SetFixedWidth(math.Round((mylist:GetWide() * (0.5/5))))
	colum =  mylist:AddColumn("Message")
	colum:SetFixedWidth(math.Round((mylist:GetWide() * (4/5))))
	for k, v in pairs(MessageLog) do
		local line = mylist:AddLine(CurTime(), v.location, v.message )
		line.Columns[3]:SetTextColor(v.color)
	end
	return panel;
end

local function GetServerSettingsPanel(frame)
	local panel = vgui.Create("DPanel", frame)
	panel:StretchToParent( 6, 36, 6, 6 )
	return panel
end

local function GetAboutPanel(frame)
	local panel = vgui.Create("DPanel", frame)
	panel:StretchToParent( 6, 36, 6, 6 )
	--
	local mylist = vgui.Create("DListView", panel)
	mylist:SetMultiSelect(false)
	mylist:SetPos(1,1)
	mylist:SetSize(panel:GetWide()- 2, panel:GetTall()-2)
	local colum =  mylist:AddColumn( "")
	colum:SetFixedWidth(5)
	local colum1 =  mylist:AddColumn( "About")
	colum1:SetFixedWidth(mylist:GetWide() - 5)
	mylist.SortByColumn = function()
	end
	----------
	--Text--
	----------
	mylist:AddLine( "", "Custom Addon Framework" )
	mylist:AddLine( "", "More info to be added" )
	mylist:AddLine( "", "" )
	mylist:AddLine( "", "Made By SnakeSVx" )
	mylist:AddLine( "", "Official website: http://www.snakesvx.net" )
	--
	return panel
end

local MainFrame = nil;

function CAF2.CloseMainMenu()
	if MainFrame then MainFrame:Close() end
end

function CAF2.RefreshMainMenu()
	if MainFrame then
		 CAF2.OpenMainMenu()
	end
end

function CAF2.OpenMainMenu()
	CAF2.CloseMainMenu();
	MainFrame= vgui.Create("DFrame")
	MainFrame:SetDeleteOnClose()
	MainFrame:SetDraggable( false )
	MainFrame:SetTitle("Custom Addon Framework Main Menu")
	MainFrame:SetSize(ScrW() * 0.8, ScrH() * 0.9)
	MainFrame:Center()
	local ContentPanel = vgui.Create( "DPropertySheet", MainFrame )
	ContentPanel:Dock(FILL)
	ContentPanel:AddSheet( CAF.GetLangVar("Installed Addons"), GetStatusPanel(ContentPanel), "icon16/application.png", true, true )
	ContentPanel:AddSheet( CAF.GetLangVar("Info and Help"), GetHelpPanel(ContentPanel), "icon16/box.png", true, true )
	if LocalPlayer():IsAdmin() then
		ContentPanel:AddSheet( CAF.GetLangVar("Server Settings"), GetServerSettingsPanel(ContentPanel), "icon16/wrench.png", true, true )
	end
	ContentPanel:AddSheet( CAF.GetLangVar("Message Log"), GetMessageLogPanel(ContentPanel), "icon16/wrench.png", true, true )
	ContentPanel:AddSheet( CAF.GetLangVar("About"), GetAboutPanel(ContentPanel), "icon16/group.png", true, true )
	MainFrame:MakePopup()
end
concommand.Add("Main_CAF_Menu", CAF2.OpenMainMenu)

--Panel
local function BuildMenu( Panel )
	Panel:ClearControls( )
	Panel:AddControl( "Header", { Text = "Custom Addon Framework", Description   = "Custom Addon Framework" }  )
	Panel:AddControl( "Button", {
		Label = "Open Menu",
		Text = "Custom Addon Framework",
		Command = "Main_CAF_Menu"
		} )
end

local function CreateMenu( )
	spawnmenu.AddToolMenuOption( "Custom Addon Framework", "Custom Addon Framework", "MainInfoMenu", "Main Info Menu", "", "", BuildMenu, { } )
end
hook.Add( "PopulateToolMenu", "Caf_OpenMenu_AddMenu", CreateMenu )

function CAF2.POPUP(msg, location, color, displaytime)
	if msg then
		AddPopup(msg, location, color, displaytime);
	end
end

local function ProccessMessage(len, client)
	local msg = net.ReadString()
	local location = net.ReadString()
	local r = net.ReadUInt( 8 )
	local g = net.ReadUInt( 8 )
	local b = net.ReadUInt( 8 )
	local a = net.ReadUInt( 8 )
	local displaytime = net.ReadUInt( 16 )
	local color = Color(r, g, b, a);
	CAF2.POPUP(msg, location, color, displaytime);
end
net.Receive("CAF_Addon_POPUP", ProccessMessage)

--CAF = CAF2

--Include clientside files

--Core

local Files = file.Find( "caf/core/client/*.lua" , "LUA")
for k, File in ipairs(Files) do
	Msg(CAF.GetLangVar("Loading")..": "..File.."...")
	local ErrorCheck, PCallError = pcall(include, "caf/core/client/"..File)
	if(not ErrorCheck) then
		ErrorOffStuff(PCallError)
	else
		Msg("Loaded: Successfully\n")
	end
end

Files = file.Find("caf/languagevars/*.lua", "LUA")
for k, File in ipairs(Files) do
	Msg(CAF.GetLangVar("Loading")..": "..File.."...")
	local ErrorCheck, PCallError = pcall(include, "caf/languagevars/"..File)
	if(not ErrorCheck) then
		ErrorOffStuff(PCallError)
	else
		Msg("Sent: Successfully\n")
	end
end

--Addons
local Files = file.Find( "caf/addons/client/*.lua" , "LUA")
for k, File in ipairs(Files) do
	Msg(CAF.GetLangVar("Loading")..": "..File.."...")
	local ErrorCheck, PCallError = pcall(include, "caf/addons/client/"..File)
	if(not ErrorCheck) then
		ErrorOffStuff(PCallError)
	else
		Msg("Loaded: Successfully\n")
	end
end

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

	<title>Module: Opinio</title>

	<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />

          Home
          Classes
          Methods

In Files

lib/generators/opinio/install/install_generator.rb

lib/generators/opinio/views/views_generator.rb

lib/opinio/controllers/extensions.rb

lib/opinio/controllers/helpers.rb

lib/opinio/controllers/internal_helpers.rb

lib/opinio/controllers/replies.rb

lib/opinio/opinio_model.rb

lib/opinio/opinio_subjectum.rb

lib/opinio/orm/active_record.rb

lib/opinio/rails.rb

lib/opinio/railtie.rb

lib/opinio/schema.rb

lib/opinio.rb

Namespace

MODULE Opinio::Controllers

MODULE Opinio::Generators

MODULE Opinio::OpinioModel

MODULE Opinio::OpinioSubjectum

MODULE Opinio::Orm

MODULE Opinio::Schema

CLASS Opinio::CommentsController

CLASS Opinio::Engine

CLASS Opinio::Railtie

Methods

::check_custom_identifiers

::opinio_identifier

::set_destroy_conditions

::setup

Files

Gemfile

MIT-LICENSE

README.rdoc

Rakefile

Rakefile

Class Index

				<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
				<fieldset>
					<legend>Quicksearch</legend>
					<input type="text" name="quicksearch" value=""
						class="quicksearch-field" />
				</fieldset>
				</form>

Opinio

Opinio::CommentsController

Opinio::Controllers

Opinio::Controllers::Extensions

Opinio::Controllers::Extensions::ClassMethods

Opinio::Controllers::Extensions::InstanceMethods

Opinio::Controllers::Helpers

Opinio::Controllers::InternalHelpers

Opinio::Controllers::Replies

Opinio::Engine

Opinio::Generators

Opinio::Generators::InstallGenerator

Opinio::Generators::ViewsGenerator

Opinio::OpinioModel

Opinio::OpinioModel::ClassMethods

Opinio::OpinioModel::InstanceMethods

Opinio::OpinioSubjectum

Opinio::OpinioSubjectum::ClassMethods

Opinio::OpinioSubjectum::InstanceMethods

Opinio::Orm

Opinio::Orm::ActiveRecord

Opinio::Orm::ActiveRecord::Schema

Opinio::Schema

ActionDispatch

ActionDispatch::Routing

ActionDispatch::Routing::Mapper

Dummy

Dummy::Application

ApplicationController

ApplicationHelper

Comment

CreateComments

CreatePosts

CreateUsers

NavigationHelpers

Post

PostsController

PostsHelper

User

UsersController

UsersHelper

WithinHelpers

No matching classes.

Opinio

Public Class Methods

					check_custom_identifiers(params)
					click to toggle source

    # File lib/opinio.rb, line 44
44:   def self.check_custom_identifiers(params)
45:     self.custom_identifiers.each do |idf|
46:       ret = idf.call(params)
47:       return ret unless ret.nil?
48:     end
49:     nil
50:   end

					opinio_identifier(block)
					click to toggle source

    # File lib/opinio.rb, line 36
36:   def self.opinio_identifier(block)
37:     @@custom_identifiers << block
38:   end

					set_destroy_conditions(&block)
					click to toggle source

    # File lib/opinio.rb, line 40
40:   def self.set_destroy_conditions(&block)
41:     @@destroy_conditions = block
42:   end

					setup()
					click to toggle source

    # File lib/opinio.rb, line 32
32:   def self.setup
33:     yield self
34:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish
			Rdoc Generator 1.1.6.


text:
module ShouldaMatchmakers
  module Generator
    module ActiveRecord
      module ModelMatcherGeneratorHelper

        def load_application
          Rails.application.try(:eager_load!)
        end

        def get_app_active_record_descendants_names
          if defined?(::ActiveRecord::Base)
            ::ActiveRecord::Base.descendants.map(&:name)
          else
            []
          end
        end

        def save_generate(class_name, generator)
          begin
            yield
          rescue => e
            if generator == "model"
              puts "Cannot create model spec for #{ class_name }. Reason #{ e.message }"
            else
              puts "Cannot create factory for #{ class_name }. Reason #{ e.message }"
            end
          end
        end

        def filter_app_active_record_descendants_names(generator, generator_options, app_active_record_class_names)

          generator_include_option_active_record_class_names = generator_options.fetch('include')
          generator_exclude_option_active_record_class_names = generator_options.fetch('exclude')
          generator_include_and_config_options_active_record_class_names = generator_options.fetch('include_and_config')
          generator_exclude_and_config_options_active_record_class_names = generator_options.fetch('exclude_and_config')

          if generator_include_option_active_record_class_names.present?
            filter_active_record_class_names_with_include_option(app_active_record_class_names, generator_include_option_active_record_class_names)

          elsif generator_exclude_option_active_record_class_names.present?
            filter_active_record_class_names_with_exclude_option(app_active_record_class_names, generator_exclude_option_active_record_class_names)

          elsif generator_include_and_config_options_active_record_class_names.present?
            filter_active_record_class_names_with_generator_include_and_config_options(app_active_record_class_names, generator_include_and_config_options_active_record_class_names, generator)

          elsif generator_exclude_and_config_options_active_record_class_names.present?
            filter_active_record_class_names_with_generator_exclude_and_config_options(app_active_record_class_names, generator_exclude_and_config_options_active_record_class_names, generator)

          else
            selected_app_active_record_class_names = filter_active_record_class_names_with_config_options(app_active_record_class_names, generator)
            if selected_app_active_record_class_names.present?
              selected_app_active_record_class_names
            else
              app_active_record_class_names.uniq.sort
            end
          end

        end

        def filter_active_record_class_names_with_include_option(app_active_record_class_names, include_option_active_record_class_names)
          app_active_record_class_names.map.select { |app_class_name| include_option_active_record_class_names.include? app_class_name }.uniq.sort
        end

        def filter_active_record_class_names_with_exclude_option(app_active_record_class_names, exclude_option_active_record_class_names)
          app_active_record_class_names.map.reject { |app_class_name| exclude_option_active_record_class_names.include? app_class_name }.uniq.sort
        end

        def filter_active_record_class_names_with_generator_include_and_config_options(app_active_record_class_names, generator_include_and_config_options_active_record_class_names, generator)
          selected_app_active_record_class_names = filter_active_record_class_names_with_config_options(app_active_record_class_names, generator)
          if selected_app_active_record_class_names.present?
            selected_app_active_record_class_names +
              filter_active_record_class_names_with_include_option(app_active_record_class_names, generator_include_and_config_options_active_record_class_names).uniq.sort
          else
            filter_active_record_class_names_with_include_option(app_active_record_class_names, generator_include_and_config_options_active_record_class_names).uniq.sort
          end
        end

        def filter_active_record_class_names_with_generator_exclude_and_config_options(app_active_record_class_names, generator_exclude_and_config_options_active_record_class_names, generator)
          selected_active_record_model_names = filter_active_record_class_names_with_config_options(app_active_record_class_names, generator)
          if selected_active_record_model_names.present?
            filter_active_record_class_names_with_exclude_option(selected_active_record_model_names, generator_exclude_and_config_options_active_record_class_names).uniq.sort
          else
            filter_active_record_class_names_with_exclude_option(app_active_record_class_names, generator_exclude_and_config_options_active_record_class_names).uniq.sort
          end
        end

        def filter_active_record_class_names_with_config_options(app_active_record_class_names, generator)
          if generator == "model"
            config_included_option_active_record_class_names = ::ShouldaMatchmakers.configuration.active_record_class_names_included
            config_excluded_option_active_record_class_names = ::ShouldaMatchmakers.configuration.active_record_class_names_excluded
          else
            config_included_option_active_record_class_names = ::ShouldaMatchmakers.configuration.active_record_model_class_names_for_factories_included
            config_excluded_option_active_record_class_names = ::ShouldaMatchmakers.configuration.active_record_model_class_names_for_factories_excluded
          end
          if config_included_option_active_record_class_names.present?
            filter_active_record_class_names_with_include_option(app_active_record_class_names, config_included_option_active_record_class_names).uniq.sort
          elsif config_excluded_option_active_record_class_names.present?
            filter_active_record_class_names_with_exclude_option(app_active_record_class_names, config_excluded_option_active_record_class_names).uniq.sort
          else
            []
          end
        end

      end
    end
  end
end


text:
package org.apache.camel.processor.aggregate;

import org.apache.camel.AggregationStrategy;
import org.apache.camel.Exchange;

import static org.apache.camel.support.ExchangeHelper.hasExceptionBeenHandledByErrorHandler;

/**
 * An {@link AggregationStrategy} which just uses the latest exchange which is useful
 * for status messages where old status messages have no real value. Another example is things
 * like market data prices, where old stock prices are not that relevant, only the current price is.
 */
public class UseLatestAggregationStrategy implements AggregationStrategy {

    public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
        if (newExchange == null) {
            return oldExchange;
        }
        if (oldExchange == null) {
            return newExchange;
        }

        Exchange answer = null;

        // propagate exception first
        propagateException(oldExchange, newExchange);
        if (newExchange.getException() != null) {
            answer = newExchange;
        }

        if (answer == null) {
            // the propagate failures
            answer = propagateFailure(oldExchange, newExchange);
        }

        return answer;
    }

    protected void propagateException(Exchange oldExchange, Exchange newExchange) {
        if (oldExchange == null) {
            return;
        }

        // propagate exception from old exchange if there isn't already an exception
        if (newExchange.getException() == null) {
            newExchange.setException(oldExchange.getException());
            newExchange.setProperty(Exchange.FAILURE_ENDPOINT, oldExchange.getProperty(Exchange.FAILURE_ENDPOINT));
        }
    }

    protected Exchange propagateFailure(Exchange oldExchange, Exchange newExchange) {
        if (oldExchange == null) {
            return newExchange;
        }

        // propagate exception from old exchange if there isn't already an exception
        boolean exceptionHandled = hasExceptionBeenHandledByErrorHandler(oldExchange);
        if (oldExchange.isFailed() || oldExchange.isRollbackOnly() || exceptionHandled) {
            // propagate failure by using old exchange as the answer
            return oldExchange;
        }

        return newExchange;
    }

    @Override
    public String toString() {
        return "UseLatestAggregationStrategy";
    }
}


text: define(["jquery"],function(){console.log("square init")});


text:
1. Download the latest release from the releases tab on the Github repository
2. Make sure that the Dockerfile references the release you have, that you should
   have placed in /target at the root of the project.
3. docker build

Have fun!

##Complex Instructions##

If you have made any changes to the code and you want to deploy your custom version
of Toggler as a container, then you need these extra steps:

1. Bump the version number in /project.clj
2. lein uberjar

Now follow the instructions above.


text:
class AddOnlyRequiredFilesToAssignments < ActiveRecord::Migration
  def change
    add_column :assignments, :only_required_files, :boolean
  end
end


text:
package org.cactoos.matchers;

import java.io.ByteArrayOutputStream;
import org.cactoos.io.OutputTo;
import org.cactoos.io.TeeInput;
import org.cactoos.text.TextOf;
import org.hamcrest.MatcherAssert;
import org.hamcrest.StringDescription;
import org.hamcrest.core.IsEqual;
import org.junit.Test;

/**
 * Test case for {@link TeeInputHasResult}.
 *
 * @author Roman Proshin (roman@proshin.org)
 * @version $Id$
 * @since 1.0
 * @checkstyle JavadocMethodCheck (500 lines)
 */
public final class TeeInputHasResultTest {

    @Test
    public void failsIfInputDoesNotMatchExpectedValue() {
        final TeeInput matchable = new TeeInput(
            new TextOf("input"),
            new OutputTo(new ByteArrayOutputStream())
        );
        final String expected = "expected-1";
        final TeeInputHasResult matcher = new TeeInputHasResult(
            expected,
            new TextOf(expected)
        );
        MatcherAssert.assertThat(
            "Matcher does not compare input and expected values",
            matcher.matchesSafely(matchable),
            new IsEqual<>(false)
        );
    }

    @Test
    public void describesMismatchOfInputAndExpected() {
        final TeeInput matchable = new TeeInput(
            new TextOf("i"),
            new OutputTo(new ByteArrayOutputStream())
        );
        final TeeInputHasResult matcher = new TeeInputHasResult(
            "e",
            new TextOf("e")
        );
        final StringDescription description = new StringDescription();
        matcher.matchesSafely(matchable);
        matcher.describeMismatchSafely(matchable, description);
        MatcherAssert.assertThat(
            "Description of mismatch of input and expected incorrect",
            description.toString(),
            new IsEqual<>(
                "TeeInput with result \"e\" and copied value \"e\""
            )
        );
    }

    @Test
    public void failsIfCopiedValueDoesNotMatchExpectedValue() {
        final String expected = "expected-2";
        final TeeInput matchable = new TeeInput(
            new TextOf(expected),
            new OutputTo(new ByteArrayOutputStream())
        );
        final TeeInputHasResult matcher = new TeeInputHasResult(
            expected,
            new TextOf("incorrect")
        );
        MatcherAssert.assertThat(
            "Matcher does not compare copied and expected values",
            matcher.matchesSafely(matchable),
            new IsEqual<>(false)
        );
    }

    @Test
    public void describesMismatchOfCopiedAndExpected() {
        final TeeInput matchable = new TeeInput(
            new TextOf("i"),
            new OutputTo(new ByteArrayOutputStream())
        );
        final TeeInputHasResult matcher = new TeeInputHasResult(
            "i",
            new TextOf("wrong")
        );
        final StringDescription description = new StringDescription();
        matcher.matchesSafely(matchable);
        matcher.describeMismatchSafely(matchable, description);
        MatcherAssert.assertThat(
            "Description of mismatch of copied and expected incorrect",
            description.toString(),
            new IsEqual<>(
                "TeeInput with result \"i\" and copied value \"i\""
            )
        );
    }
}


text:
<md-dialog>
    <md-toolbar class="md-accent">

{{review.name}}

            <md-button class="md-icon-button" ng-click="closeDialog()">
            	<md-icon class="fa fa-lg" md-font-icon="fa-times"></md-icon>
        	</md-button>

    </md-toolbar>
    <md-dialog-content>
    	<md-content>

                    =n,'fa-star-half-o':review.score>=n && review.score<n-1,'fa-star-o':review.score<n}">

                Submitted  by {{review.user.username}}

    	</md-content>
        <md-content ng-bind-html="review.contentHTML" class="discussion-content" ng-if="review.contentHTML">

        </md-content>

        <md-content style="text-align:right">

        		<md-button class="md-icon-button md-warn md-mini" ng-click="review.showReport=true" ng-if="authentication.user">
        			<md-icon class="fa fa-lg" md-font-icon="fa-exclamation-triangle"></md-icon>
        		</md-button>

    			<md-button ng-click="openReviewEditor($event, review)" class="md-primary" ng-if="review.user._id === authentication.user._id">
		        	<md-icon class="fa fa-lg" md-font-icon="fa-edit"></md-icon>
		    	</md-button>
		    	<md-button ng-click="removeReview(review)" class="md-warn" ng-if="review.user._id === authentication.user._id || authentication.user.roles.indexOf('admin') >= 0">
		    		<md-icon class="fa fa-lg" md-font-icon="fa-trash"></md-icon>
		    	</md-button>

    	</md-content>
    </md-dialog-content>
</md-dialog>


text:
package io.datarouter.storage.node.adapter.trace.mixin;

import java.util.Collection;

import io.datarouter.instrumentation.trace.TracerTool;
import io.datarouter.instrumentation.trace.TracerTool.TraceSpanInfoBuilder;
import io.datarouter.model.databean.Databean;
import io.datarouter.model.key.primary.PrimaryKey;
import io.datarouter.model.serialize.fielder.DatabeanFielder;
import io.datarouter.storage.config.Config;
import io.datarouter.storage.node.op.raw.MapStorage;
import io.datarouter.storage.node.op.raw.MapStorage.MapStorageNode;

public interface MapStorageTraceAdapterMixin<
		PK extends PrimaryKey<PK>,
		D extends Databean<PK,D>,
		F extends DatabeanFielder<PK,D>,
		N extends MapStorageNode<PK,D,F>>
extends MapStorage<PK,D>, MapStorageReaderTraceAdapterMixin<PK,D,F,N>{

	//Writer

	@Override
	public default void put(D databean, Config config){
		try(var $ = startSpanForOp(OP_put)){
			getBackingNode().put(databean, config);
		}
	}

	@Override
	public default void putMulti(Collection<D> databeans, Config config){
		try(var $ = startSpanForOp(OP_putMulti)){
			getBackingNode().putMulti(databeans, config);
			TracerTool.appendToSpanInfo(new TraceSpanInfoBuilder().databeans(databeans.size()));
		}
	}

	@Override
	public default void delete(PK key, Config config){
		try(var $ = startSpanForOp(OP_delete)){
			getBackingNode().delete(key, config);
		}
	}

	@Override
	public default void deleteMulti(Collection<PK> keys, Config config){
		try(var $ = startSpanForOp(OP_deleteMulti)){
			getBackingNode().deleteMulti(keys, config);
			TracerTool.appendToSpanInfo(new TraceSpanInfoBuilder().keys(keys.size()));
		}
	}

	@Override
	public default void deleteAll(Config config){
		try(var $ = startSpanForOp(OP_deleteAll)){
			getBackingNode().deleteAll(config);
		}
	}

}


text:
package com.hurence.logisland.processor;

/**
 * Copyright (C) 2019 Hurence (support@hurence.com)
 *

 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *

 * http://www.apache.org/licenses/LICENSE-2.0
 *

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import com.hurence.logisland.component.InitializationException;
import com.hurence.logisland.processor.agg.Agg;
import com.hurence.logisland.annotation.documentation.CapabilityDescription;
import com.hurence.logisland.annotation.documentation.ExtraDetailFile;
import com.hurence.logisland.annotation.documentation.Tags;
import com.hurence.logisland.component.PropertyDescriptor;
import com.hurence.logisland.record.Field;
import com.hurence.logisland.record.FieldType;
import com.hurence.logisland.record.Record;
import com.hurence.logisland.validator.StandardValidators;
import com.hurence.logisland.validator.ValidationContext;
import com.hurence.logisland.validator.ValidationResult;
import org.apache.commons.lang3.StringUtils;

import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;

@Tags({"record", "fields", "agg", "aggregation", "metric", "stat"})
@CapabilityDescription("Enable to compute some common aggregations on all records or on array fields of records")
@ExtraDetailFile("./details/common-processors/ComputeAggsProcessor-Detail.rst")
public class ComputeAggsProcessor extends AbstractProcessor {

    public static final String DYNAMIC_PROPS_AGG_TYPE_SUFFIX = ".agg";
    public static final String DYNAMIC_PROPS_TYPE_SUFFIX = ".type";

    private final Set<PropertyDescriptor> dynamicFieldProperties = new HashSet<>();
    private final  Map<String, PropertyDescriptor> dynamicAggTypeProperties = new HashMap<>();
    private final  Map<String, PropertyDescriptor> dynamicTypeResultProperties = new HashMap<>();

    @Override
    public List<PropertyDescriptor> getSupportedPropertyDescriptors() {
        final List<PropertyDescriptor> descriptors = new ArrayList<>();
        return descriptors;
    }

    @Override
    protected Collection<ValidationResult> customValidate(ValidationContext context) {
        final Collection<ValidationResult> validations = new ArrayList<>();
        Set<Map.Entry<PropertyDescriptor, String>> props = context.getProperties().entrySet();
        if (props.isEmpty()) {
            validations.add(new ValidationResult.Builder()
                    .input("processor conf")
                    .explanation("processor must have at least one aggregation configured otherwise just delete this processor")
                    .valid(false)
                    .build()
            );
        }
        final Set<PropertyDescriptor> dynamicFieldPropertiesTmp = new HashSet<>();
        final Map<String, PropertyDescriptor> dynamicAggTypePropertiesTmp = new HashMap<>();
        final Map<String, PropertyDescriptor> dynamicTypeResultPropertiesTmp = new HashMap<>();
        for (final Map.Entry<PropertyDescriptor, String> entry : props) {//TODO
            if (!entry.getKey().isDynamic()) {
                continue;
            }
            if (entry.getKey().getName().endsWith(DYNAMIC_PROPS_AGG_TYPE_SUFFIX)) {
                dynamicAggTypePropertiesTmp.put(StringUtils.removeEnd(entry.getKey().getName(), DYNAMIC_PROPS_AGG_TYPE_SUFFIX), entry.getKey());
                continue;
            }
            if (entry.getKey().getName().endsWith(DYNAMIC_PROPS_TYPE_SUFFIX)) {
                dynamicTypeResultPropertiesTmp.put(StringUtils.removeEnd(entry.getKey().getName(), DYNAMIC_PROPS_TYPE_SUFFIX), entry.getKey());
                continue;
            }
            dynamicFieldPropertiesTmp.add(entry.getKey());
        }
        dynamicFieldPropertiesTmp.forEach(desc -> {
            if (!dynamicAggTypePropertiesTmp.containsKey(desc.getName())) {
                validations.add(new ValidationResult.Builder()
                        .input(desc.getName())
                        .explanation(String.format("You must configure property '%s' to specify the kind of agg to use",
                                desc.getName() + DYNAMIC_PROPS_AGG_TYPE_SUFFIX))
                        .valid(false)
                        .build()
                );
            }
            if (!dynamicTypeResultPropertiesTmp.containsKey(desc.getName())) {
                validations.add(new ValidationResult.Builder()
                        .input(desc.getName())
                        .explanation(String.format("You must configure property '%s' to specify the agg result type",
                                desc.getName() + DYNAMIC_PROPS_TYPE_SUFFIX))
                        .valid(false)
                        .build()
                );
            }
        });
        //test that there is a field to create with associated field for each type result or kind of aggs
        dynamicAggTypePropertiesTmp.keySet().forEach(key -> {
            Optional<PropertyDescriptor> foundDesc = dynamicFieldPropertiesTmp.stream()
                    .filter(desc -> desc.getName().equals(key))
                    .findAny();
            if (!foundDesc.isPresent()) {
                validations.add(new ValidationResult.Builder()
                        .input(key)
                        .explanation(String.format(
                                "You must configure property '%s' to specify the field to create and on which field to compute aggregation.",
                                key))
                        .valid(false)
                        .build()
                );
            }
        });
        dynamicTypeResultPropertiesTmp.keySet().forEach(key -> {
            Optional<PropertyDescriptor> foundDesc = dynamicFieldPropertiesTmp.stream()
                    .filter(desc -> desc.getName().equals(key))
                    .findAny();
            if (!foundDesc.isPresent()) {
                validations.add(new ValidationResult.Builder()
                        .input(key)
                        .explanation(String.format(
                                "You must configure property '%s' to specify the field to create and on which field to compute aggregation.",
                                key))
                        .valid(false)
                        .build()
                );
            }
        });
        return  validations;
    }

    @Override
    protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) {
        if (propertyDescriptorName.endsWith(DYNAMIC_PROPS_AGG_TYPE_SUFFIX)) {
            return new PropertyDescriptor.Builder()
                    .name(propertyDescriptorName)
                    .expressionLanguageSupported(false)
                    .addValidator(new StandardValidators.EnumValidator(Agg.class))
                    .allowableValues(Agg.values())
                    .required(false)
                    .dynamic(true)
                    .build();
        }
        if (propertyDescriptorName.endsWith(DYNAMIC_PROPS_TYPE_SUFFIX)) {
            return new PropertyDescriptor.Builder()
                    .name(propertyDescriptorName)
                    .expressionLanguageSupported(false)
                    .addValidator(new StandardValidators.EnumValidator(FieldType.class))
                    .allowableValues(FieldType.DOUBLE.toString().toUpperCase(), FieldType.LONG.toString().toUpperCase(),
                            FieldType.INT.toString().toUpperCase(), FieldType.FLOAT.toString().toUpperCase())
                    .required(false)
                    .dynamic(true)
                    .build();
        }
        return new PropertyDescriptor.Builder()
                .name(propertyDescriptorName)
                .expressionLanguageSupported(false)
                .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
                .required(false)
                .dynamic(true)
                .build();
    }

    @Override
    public void init(final ProcessContext context) throws InitializationException{
        super.init(context);
        initDynamicProperties(context);
    }

    private void initDynamicProperties(final ProcessContext context) {
        dynamicFieldProperties.clear();
        dynamicAggTypeProperties.clear();
        dynamicTypeResultProperties.clear();
        // loop over dynamic properties to add alternative regex
        for (final Map.Entry<PropertyDescriptor, String> entry : context.getProperties().entrySet()) {
            if (!entry.getKey().isDynamic()) {
                continue;
            }
            if (entry.getKey().getName().endsWith(DYNAMIC_PROPS_AGG_TYPE_SUFFIX)) {
                dynamicAggTypeProperties.put(StringUtils.removeEnd(entry.getKey().getName(), DYNAMIC_PROPS_AGG_TYPE_SUFFIX), entry.getKey());
                continue;
            }
            if (entry.getKey().getName().endsWith(DYNAMIC_PROPS_TYPE_SUFFIX)) {
                dynamicTypeResultProperties.put(StringUtils.removeEnd(entry.getKey().getName(), DYNAMIC_PROPS_TYPE_SUFFIX), entry.getKey());
                continue;
            }
            dynamicFieldProperties.add(entry.getKey());
        }
    }

    @Override
    public Collection<Record> process(final ProcessContext context, Collection<Record> records) {
        return records.stream()
                .map(r -> computeAggs(context, r))
                .collect(Collectors.toList());
    }

    private Record computeAggs(ProcessContext context, Record record) {
        dynamicFieldProperties.forEach(mergeFieldDescriptor -> {
            final String fieldNameToComputeAgg = context.getPropertyValue(mergeFieldDescriptor).asString();
            String fieldNameToAdd = mergeFieldDescriptor.getName();
            if (!record.hasField(fieldNameToComputeAgg)) return;
            Field fieldToAggregate =  record.getField(fieldNameToComputeAgg);
            if (!FieldType.ARRAY.equals(fieldToAggregate.getType())) return;
            Agg aggType = Agg.valueOf(context.getPropertyValue(dynamicAggTypeProperties.get(fieldNameToAdd)).asString());
            FieldType type = FieldType.valueOf(context.getPropertyValue(dynamicTypeResultProperties.get(fieldNameToAdd)).asString());
            Number aggValue = null;
            try {
                List<? extends Number> values = (List<? extends Number>) fieldToAggregate.getRawValue();
                switch (type) {
                    case INT:
                        aggValue = computeAgg(aggType, values.stream().mapToInt(Number::intValue));
                        break;
                    case LONG:
                        aggValue = computeAgg(aggType, values.stream().mapToLong(Number::longValue));
                        break;
                    case FLOAT:
                        aggValue = computeAgg(aggType, values.stream().mapToDouble(Number::floatValue)).floatValue();
                        break;
                    case DOUBLE:
                        aggValue = computeAgg(aggType, values.stream().mapToDouble(Number::doubleValue));
                        break;
                    case ARRAY:
                    case NULL:
                    case STRING:
                    case BYTES:
                    case RECORD:
                    case MAP:
                    case ENUM:
                    case BOOLEAN:
                    case UNION:
                    case DATETIME:
                        return;//do nothing
                }
                record.setField(fieldNameToAdd, type, aggValue);
            } catch (Exception ex) {
                record.addError("ERROR TYPE", getLogger(),
                        "error while computing aggregate '{}' on field '{}'",
                        new Object[]{aggType, fieldNameToComputeAgg});
            }
        });
        return record;
    }

    private Number computeAgg(Agg aggType, DoubleStream stream) {
        switch (aggType) {
            case MAX:
                return stream.max().orElseThrow(NoSuchElementException::new);
            case MIN:
                return stream.min().orElseThrow(NoSuchElementException::new);
            case AVG:
                return stream.average().orElseThrow(NoSuchElementException::new);
            default:
                throw new IllegalArgumentException("Invalid agg type '" + aggType + "'");
        }
    }

    private Number computeAgg(Agg aggType, IntStream stream) {
        switch (aggType) {
            case MAX:
                return stream.max().orElseThrow(NoSuchElementException::new);
            case MIN:
                return stream.min().orElseThrow(NoSuchElementException::new);
            case AVG:
                return stream.average().orElseThrow(NoSuchElementException::new);
            default:
                throw new IllegalArgumentException("Invalid agg type '" + aggType + "'");
        }
    }

    private Number computeAgg(Agg aggType, LongStream stream) {
        switch (aggType) {
            case MAX:
                return stream.max().orElseThrow(NoSuchElementException::new);
            case MIN:
                return stream.min().orElseThrow(NoSuchElementException::new);
            case AVG:
                return stream.average().orElseThrow(NoSuchElementException::new);
            default:
                throw new IllegalArgumentException("Invalid agg type '" + aggType + "'");
        }
    }
}


text:
(function (app) {
  'use strict';

  app.registerModule('customer', ['core']);// The core module is required for special route handling; see /core/client/config/core.client.routes
//  app.registerModule('articles.admin', ['core.admin']);
//  app.registerModule('articles.admin.routes', ['core.admin.routes']);
  app.registerModule('customer.services');
  app.registerModule('customer.routes', ['ui.router', 'core.routes', 'customer.services']);
}(ApplicationConfiguration));


text:
var convert = require('./convert'),
    func = convert('isFunction', require('../isFunction'), require('./_falseOptions'));

func.placeholder = require('./placeholder');
module.exports = func;


text:
package com.datatorrent.benchmark.hbase;

import org.apache.hadoop.conf.Configuration;

import com.datatorrent.api.DAG;
import com.datatorrent.api.DAG.Locality;
import com.datatorrent.api.StreamingApplication;
import com.datatorrent.api.annotation.ApplicationAnnotation;
import com.datatorrent.contrib.hbase.HBaseCsvMappingPutOperator;
import com.datatorrent.contrib.hbase.HBaseRowStringGenerator;

/**
 * BenchMark Results
 * -----------------
 * The operator operates at 20,000 tuples/sec with the following configuration
 *
 * Container memory size=1G
 * CPU=Intel(R) Core(TM) i7-4500U CPU @ 1.80 GHz 2.40 Ghz
 *
 * @since 1.0.4
 */
@ApplicationAnnotation(name="HBaseBenchmarkApp")
public class HBaseCsvMappingApplication implements StreamingApplication
{
  private final Locality locality = null;

  @Override
  public void populateDAG(DAG dag, Configuration conf)
  {
    HBaseRowStringGenerator row = dag.addOperator("rand", new HBaseRowStringGenerator());

    HBaseCsvMappingPutOperator csvMappingPutOperator = dag.addOperator("HBaseoper", new HBaseCsvMappingPutOperator());
    csvMappingPutOperator.getStore().setTableName("table1");
    csvMappingPutOperator.getStore().setZookeeperQuorum("127.0.0.1");
    csvMappingPutOperator.getStore().setZookeeperClientPort(2181);
    csvMappingPutOperator.setMappingString("colfam0.street,colfam0.city,colfam0.state,row");
    dag.addStream("hbasestream",row.outputPort, csvMappingPutOperator.input).setLocality(locality);
  }

}