text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/container/v1beta1/cluster_service.proto

package com.google.container.v1beta1;

/**
 *
 *
 *

 * WorkloadMetadataConfig defines the metadata configuration to expose to
 * workloads on the node pool.
 *

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

  private WorkloadMetadataConfig() {
    nodeMetadata_ = 0;
    mode_ = 0;
  }

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

  @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.container.v1beta1.ClusterServiceProto
        .internal_static_google_container_v1beta1_WorkloadMetadataConfig_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.container.v1beta1.ClusterServiceProto
        .internal_static_google_container_v1beta1_WorkloadMetadataConfig_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.container.v1beta1.WorkloadMetadataConfig.class,
            com.google.container.v1beta1.WorkloadMetadataConfig.Builder.class);
  }

  /**
   *
   *
   *

   * NodeMetadata is the configuration for if and how to expose the node
   * metadata to the workload running on the node.
   *

   *
   * Protobuf enum {@code google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata}
   */
  public enum NodeMetadata implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     *

     * Not set.
     *

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

     * Prevent workloads not in hostNetwork from accessing certain VM metadata,
     * specifically kube-env, which contains Kubelet credentials, and the
     * instance identity token.
     * Metadata concealment is a temporary security solution available while the
     * bootstrapping process for cluster nodes is being redesigned with
     * significant security improvements.  This feature is scheduled to be
     * deprecated in the future and later removed.
     *

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

     * Expose all VM metadata to pods.
     *

     *
     * EXPOSE = 2;
     */
    EXPOSE(2),
    /**
     *
     *
     *

     * Run the GKE Metadata Server on this node. The GKE Metadata Server exposes
     * a metadata API to workloads that is compatible with the V1 Compute
     * Metadata APIs exposed by the Compute Engine and App Engine Metadata
     * Servers. This feature can only be enabled if Workload Identity is enabled
     * at the cluster level.
     *

     *
     * GKE_METADATA_SERVER = 3;
     */
    GKE_METADATA_SERVER(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     *

     * Not set.
     *

     *
     * UNSPECIFIED = 0;
     */
    public static final int UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     *

     * Prevent workloads not in hostNetwork from accessing certain VM metadata,
     * specifically kube-env, which contains Kubelet credentials, and the
     * instance identity token.
     * Metadata concealment is a temporary security solution available while the
     * bootstrapping process for cluster nodes is being redesigned with
     * significant security improvements.  This feature is scheduled to be
     * deprecated in the future and later removed.
     *

     *
     * SECURE = 1;
     */
    public static final int SECURE_VALUE = 1;
    /**
     *
     *
     *

     * Expose all VM metadata to pods.
     *

     *
     * EXPOSE = 2;
     */
    public static final int EXPOSE_VALUE = 2;
    /**
     *
     *
     *

     * Run the GKE Metadata Server on this node. The GKE Metadata Server exposes
     * a metadata API to workloads that is compatible with the V1 Compute
     * Metadata APIs exposed by the Compute Engine and App Engine Metadata
     * Servers. This feature can only be enabled if Workload Identity is enabled
     * at the cluster level.
     *

     *
     * GKE_METADATA_SERVER = 3;
     */
    public static final int GKE_METADATA_SERVER_VALUE = 3;

    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 NodeMetadata 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 NodeMetadata forNumber(int value) {
      switch (value) {
        case 0:
          return UNSPECIFIED;
        case 1:
          return SECURE;
        case 2:
          return EXPOSE;
        case 3:
          return GKE_METADATA_SERVER;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<NodeMetadata> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<NodeMetadata>() {
          public NodeMetadata findValueByNumber(int number) {
            return NodeMetadata.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.container.v1beta1.WorkloadMetadataConfig.getDescriptor()
          .getEnumTypes()
          .get(0);
    }

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

    public static NodeMetadata 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 NodeMetadata(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata)
  }

  /**
   *
   *
   *

   * Mode is the configuration for how to expose metadata to workloads running
   * on the node.
   *

   *
   * Protobuf enum {@code google.container.v1beta1.WorkloadMetadataConfig.Mode}
   */
  public enum Mode implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     *

     * Not set.
     *

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

     * Expose all Compute Engine metadata to pods.
     *

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

     * Run the GKE Metadata Server on this node. The GKE Metadata Server exposes
     * a metadata API to workloads that is compatible with the V1 Compute
     * Metadata APIs exposed by the Compute Engine and App Engine Metadata
     * Servers. This feature can only be enabled if Workload Identity is enabled
     * at the cluster level.
     *

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

    /**
     *
     *
     *

     * Not set.
     *

     *
     * MODE_UNSPECIFIED = 0;
     */
    public static final int MODE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     *

     * Expose all Compute Engine metadata to pods.
     *

     *
     * GCE_METADATA = 1;
     */
    public static final int GCE_METADATA_VALUE = 1;
    /**
     *
     *
     *

     * Run the GKE Metadata Server on this node. The GKE Metadata Server exposes
     * a metadata API to workloads that is compatible with the V1 Compute
     * Metadata APIs exposed by the Compute Engine and App Engine Metadata
     * Servers. This feature can only be enabled if Workload Identity is enabled
     * at the cluster level.
     *

     *
     * GKE_METADATA = 2;
     */
    public static final int GKE_METADATA_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 Mode 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 Mode forNumber(int value) {
      switch (value) {
        case 0:
          return MODE_UNSPECIFIED;
        case 1:
          return GCE_METADATA;
        case 2:
          return GKE_METADATA;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<Mode> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Mode>() {
          public Mode findValueByNumber(int number) {
            return Mode.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.container.v1beta1.WorkloadMetadataConfig.getDescriptor()
          .getEnumTypes()
          .get(1);
    }

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

    public static Mode 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 Mode(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.container.v1beta1.WorkloadMetadataConfig.Mode)
  }

  public static final int NODE_METADATA_FIELD_NUMBER = 1;
  private int nodeMetadata_;
  /**
   *
   *
   *

   * NodeMetadata is the configuration for how to expose metadata to the
   * workloads running on the node.
   *

   *
   *
   * .google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata node_metadata = 1 [deprecated = true];
   *
   *
   * @deprecated google.container.v1beta1.WorkloadMetadataConfig.node_metadata is deprecated. See
   *     google/container/v1beta1/cluster_service.proto;l=4215
   * @return The enum numeric value on the wire for nodeMetadata.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public int getNodeMetadataValue() {
    return nodeMetadata_;
  }
  /**
   *
   *
   *

   * NodeMetadata is the configuration for how to expose metadata to the
   * workloads running on the node.
   *

   *
   *
   * .google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata node_metadata = 1 [deprecated = true];
   *
   *
   * @deprecated google.container.v1beta1.WorkloadMetadataConfig.node_metadata is deprecated. See
   *     google/container/v1beta1/cluster_service.proto;l=4215
   * @return The nodeMetadata.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata getNodeMetadata() {
    @SuppressWarnings("deprecation")
    com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata result =
        com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata.valueOf(nodeMetadata_);
    return result == null
        ? com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata.UNRECOGNIZED
        : result;
  }

  public static final int MODE_FIELD_NUMBER = 2;
  private int mode_;
  /**
   *
   *
   *

   * Mode is the configuration for how to expose metadata to workloads running
   * on the node pool.
   *

   *
   * .google.container.v1beta1.WorkloadMetadataConfig.Mode mode = 2;
   *
   * @return The enum numeric value on the wire for mode.
   */
  @java.lang.Override
  public int getModeValue() {
    return mode_;
  }
  /**
   *
   *
   *

   * Mode is the configuration for how to expose metadata to workloads running
   * on the node pool.
   *

   *
   * .google.container.v1beta1.WorkloadMetadataConfig.Mode mode = 2;
   *
   * @return The mode.
   */
  @java.lang.Override
  public com.google.container.v1beta1.WorkloadMetadataConfig.Mode getMode() {
    @SuppressWarnings("deprecation")
    com.google.container.v1beta1.WorkloadMetadataConfig.Mode result =
        com.google.container.v1beta1.WorkloadMetadataConfig.Mode.valueOf(mode_);
    return result == null
        ? com.google.container.v1beta1.WorkloadMetadataConfig.Mode.UNRECOGNIZED
        : result;
  }

  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 (nodeMetadata_
        != com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata.UNSPECIFIED
            .getNumber()) {
      output.writeEnum(1, nodeMetadata_);
    }
    if (mode_
        != com.google.container.v1beta1.WorkloadMetadataConfig.Mode.MODE_UNSPECIFIED.getNumber()) {
      output.writeEnum(2, mode_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (nodeMetadata_
        != com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata.UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, nodeMetadata_);
    }
    if (mode_
        != com.google.container.v1beta1.WorkloadMetadataConfig.Mode.MODE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, mode_);
    }
    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.container.v1beta1.WorkloadMetadataConfig)) {
      return super.equals(obj);
    }
    com.google.container.v1beta1.WorkloadMetadataConfig other =
        (com.google.container.v1beta1.WorkloadMetadataConfig) obj;

    if (nodeMetadata_ != other.nodeMetadata_) return false;
    if (mode_ != other.mode_) 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) + NODE_METADATA_FIELD_NUMBER;
    hash = (53 * hash) + nodeMetadata_;
    hash = (37 * hash) + MODE_FIELD_NUMBER;
    hash = (53 * hash) + mode_;
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.container.v1beta1.WorkloadMetadataConfig parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.container.v1beta1.WorkloadMetadataConfig parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.container.v1beta1.WorkloadMetadataConfig parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.container.v1beta1.WorkloadMetadataConfig 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.container.v1beta1.WorkloadMetadataConfig parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.container.v1beta1.WorkloadMetadataConfig parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.container.v1beta1.WorkloadMetadataConfig parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.container.v1beta1.WorkloadMetadataConfig 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.container.v1beta1.WorkloadMetadataConfig 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;
  }
  /**
   *
   *
   *

   * WorkloadMetadataConfig defines the metadata configuration to expose to
   * workloads on the node pool.
   *

   *
   * Protobuf type {@code google.container.v1beta1.WorkloadMetadataConfig}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.container.v1beta1.WorkloadMetadataConfig)
      com.google.container.v1beta1.WorkloadMetadataConfigOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.container.v1beta1.ClusterServiceProto
          .internal_static_google_container_v1beta1_WorkloadMetadataConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.container.v1beta1.ClusterServiceProto
          .internal_static_google_container_v1beta1_WorkloadMetadataConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.container.v1beta1.WorkloadMetadataConfig.class,
              com.google.container.v1beta1.WorkloadMetadataConfig.Builder.class);
    }

    // Construct using com.google.container.v1beta1.WorkloadMetadataConfig.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      nodeMetadata_ = 0;

      mode_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.container.v1beta1.ClusterServiceProto
          .internal_static_google_container_v1beta1_WorkloadMetadataConfig_descriptor;
    }

    @java.lang.Override
    public com.google.container.v1beta1.WorkloadMetadataConfig getDefaultInstanceForType() {
      return com.google.container.v1beta1.WorkloadMetadataConfig.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.container.v1beta1.WorkloadMetadataConfig build() {
      com.google.container.v1beta1.WorkloadMetadataConfig result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.container.v1beta1.WorkloadMetadataConfig buildPartial() {
      com.google.container.v1beta1.WorkloadMetadataConfig result =
          new com.google.container.v1beta1.WorkloadMetadataConfig(this);
      result.nodeMetadata_ = nodeMetadata_;
      result.mode_ = mode_;
      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.container.v1beta1.WorkloadMetadataConfig) {
        return mergeFrom((com.google.container.v1beta1.WorkloadMetadataConfig) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.container.v1beta1.WorkloadMetadataConfig other) {
      if (other == com.google.container.v1beta1.WorkloadMetadataConfig.getDefaultInstance())
        return this;
      if (other.nodeMetadata_ != 0) {
        setNodeMetadataValue(other.getNodeMetadataValue());
      }
      if (other.mode_ != 0) {
        setModeValue(other.getModeValue());
      }
      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 8:
              {
                nodeMetadata_ = input.readEnum();

                break;
              } // case 8
            case 16:
              {
                mode_ = input.readEnum();

                break;
              } // case 16
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int nodeMetadata_ = 0;
    /**
     *
     *
     *

     * NodeMetadata is the configuration for how to expose metadata to the
     * workloads running on the node.
     *

     *
     *
     * .google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata node_metadata = 1 [deprecated = true];
     *
     *
     * @deprecated google.container.v1beta1.WorkloadMetadataConfig.node_metadata is deprecated. See
     *     google/container/v1beta1/cluster_service.proto;l=4215
     * @return The enum numeric value on the wire for nodeMetadata.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public int getNodeMetadataValue() {
      return nodeMetadata_;
    }
    /**
     *
     *
     *

     * NodeMetadata is the configuration for how to expose metadata to the
     * workloads running on the node.
     *

     *
     *
     * .google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata node_metadata = 1 [deprecated = true];
     *
     *
     * @deprecated google.container.v1beta1.WorkloadMetadataConfig.node_metadata is deprecated. See
     *     google/container/v1beta1/cluster_service.proto;l=4215
     * @param value The enum numeric value on the wire for nodeMetadata to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setNodeMetadataValue(int value) {

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

     * NodeMetadata is the configuration for how to expose metadata to the
     * workloads running on the node.
     *

     *
     *
     * .google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata node_metadata = 1 [deprecated = true];
     *
     *
     * @deprecated google.container.v1beta1.WorkloadMetadataConfig.node_metadata is deprecated. See
     *     google/container/v1beta1/cluster_service.proto;l=4215
     * @return The nodeMetadata.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata getNodeMetadata() {
      @SuppressWarnings("deprecation")
      com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata result =
          com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata.valueOf(nodeMetadata_);
      return result == null
          ? com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     *

     * NodeMetadata is the configuration for how to expose metadata to the
     * workloads running on the node.
     *

     *
     *
     * .google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata node_metadata = 1 [deprecated = true];
     *
     *
     * @deprecated google.container.v1beta1.WorkloadMetadataConfig.node_metadata is deprecated. See
     *     google/container/v1beta1/cluster_service.proto;l=4215
     * @param value The nodeMetadata to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setNodeMetadata(
        com.google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

     * NodeMetadata is the configuration for how to expose metadata to the
     * workloads running on the node.
     *

     *
     *
     * .google.container.v1beta1.WorkloadMetadataConfig.NodeMetadata node_metadata = 1 [deprecated = true];
     *
     *
     * @deprecated google.container.v1beta1.WorkloadMetadataConfig.node_metadata is deprecated. See
     *     google/container/v1beta1/cluster_service.proto;l=4215
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder clearNodeMetadata() {

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

    private int mode_ = 0;
    /**
     *
     *
     *

     * Mode is the configuration for how to expose metadata to workloads running
     * on the node pool.
     *

     *
     * .google.container.v1beta1.WorkloadMetadataConfig.Mode mode = 2;
     *
     * @return The enum numeric value on the wire for mode.
     */
    @java.lang.Override
    public int getModeValue() {
      return mode_;
    }
    /**
     *
     *
     *

     * Mode is the configuration for how to expose metadata to workloads running
     * on the node pool.
     *

     *
     * .google.container.v1beta1.WorkloadMetadataConfig.Mode mode = 2;
     *
     * @param value The enum numeric value on the wire for mode to set.
     * @return This builder for chaining.
     */
    public Builder setModeValue(int value) {

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

     * Mode is the configuration for how to expose metadata to workloads running
     * on the node pool.
     *

     *
     * .google.container.v1beta1.WorkloadMetadataConfig.Mode mode = 2;
     *
     * @return The mode.
     */
    @java.lang.Override
    public com.google.container.v1beta1.WorkloadMetadataConfig.Mode getMode() {
      @SuppressWarnings("deprecation")
      com.google.container.v1beta1.WorkloadMetadataConfig.Mode result =
          com.google.container.v1beta1.WorkloadMetadataConfig.Mode.valueOf(mode_);
      return result == null
          ? com.google.container.v1beta1.WorkloadMetadataConfig.Mode.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     *

     * Mode is the configuration for how to expose metadata to workloads running
     * on the node pool.
     *

     *
     * .google.container.v1beta1.WorkloadMetadataConfig.Mode mode = 2;
     *
     * @param value The mode to set.
     * @return This builder for chaining.
     */
    public Builder setMode(com.google.container.v1beta1.WorkloadMetadataConfig.Mode value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

     * Mode is the configuration for how to expose metadata to workloads running
     * on the node pool.
     *

     *
     * .google.container.v1beta1.WorkloadMetadataConfig.Mode mode = 2;
     *
     * @return This builder for chaining.
     */
    public Builder clearMode() {

      mode_ = 0;
      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.container.v1beta1.WorkloadMetadataConfig)
  }

  // @@protoc_insertion_point(class_scope:google.container.v1beta1.WorkloadMetadataConfig)
  private static final com.google.container.v1beta1.WorkloadMetadataConfig DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.container.v1beta1.WorkloadMetadataConfig();
  }

  public static com.google.container.v1beta1.WorkloadMetadataConfig getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.container.v1beta1.WorkloadMetadataConfig getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
    The number of minutes for which jobs must be waiting in the queue before
    attempting to launch this slave.

redpajama_set_name: RedPajamaGithub


text:
{{course.class.name}}

Starting To Make Sense

        As you continue to create new objects in the OrderCloud API, you'll notice that it is pretty easy. This is
        due to three reasons. One, it is very standardized, meaning the process to complete an object creation for
        one type of object will be nearly identical (outside of the content) to any other object creation. Two, you are
        only required to provide the details you WANT to provide (outside of required fields). And three, you
        rarely have to worry about mapping relationships to other objects inside objects themselves (outside of Assignments,
        which is where relationships are explicitly defined). You have already heard about all three of these in prior classes,
        but they are important enough to repeat again and again. These rules also apply to other API Requests, as you
        will learn in later courses.

Request

        Remember back to the 'Create Product' request location url and you will notice a slight difference in the makeup
        of the location url for 'Create Category' shown below. The 'Create Category' request url includes a
        buyerID after '.../buyers/', which is telling the server that this category is to only be used
        under the specified buyer.

        What this means is that if you have multiple buyers who happen to buy the same products
        under the same category structure, you will need to create two separate categories. The products only need
        to be defined once, but the categories are buyer specific. The reason for this is due
        to how a user gains access to a product. A user only has access to a product if they are assigned to the
        product's assigned category. If a category were allowed to be defined across buyers, you could run into
        issues with a category being wrongly assigned to a buyer, giving them access to a set of products they shouldn't.
        In an world as complex as B2B Ecommerce, this is meant to help you from running into unforeseen mistakes.

    IDRECOMMENDED

Must be unique from all other products

Will be auto-generated if not provided in the request object

    DescriptionRECOMMENDED

Used to describe the product and used often in the UI

Will be left empty if not provided

    <button ui-sref="course({courseID: course.course.ID, classID: course.course.nextClass})" class="btn btn-success btn-block" ng-show="course.class.apiCallSuccess">Next Class</button>


text:
    #<?= $project['id'] ?>

            <?= $this->url->icon('th', t('Board'), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?>

            <?= $this->url->icon('calendar', t('Calendar'), 'CalendarController', 'show', array('project_id' => $project['id'])) ?>

            <?= $this->url->icon('list', t('Listing'), 'TaskListController', 'show', array('project_id' => $project['id'])) ?>

        <?php if ($this->user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?>

            <?= $this->url->icon('sliders', t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'])) ?>

        <?php endif ?>

            <?= $this->modal->medium('dashboard', t('Activity'), 'ActivityController', 'project', array('project_id' => $project['id'])) ?>

        <?php if ($this->user->hasProjectAccess('AnalyticController', 'taskDistribution', $project['id'])): ?>

                <?= $this->modal->large('line-chart', t('Analytics'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?>

        <?php endif ?>

        <?= $this->hook->render('template:project:dropdown', array('project' => $project)) ?>

        <?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?>

                <?= $this->url->icon('cog', t('Settings'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?>

        <?php endif ?>


text:
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>LogManager.ResetConfiguration Method (String)</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />

            Apache log4net™ SDK Documentation - Microsoft .NET Framework 4.0

LogManager.ResetConfiguration Method (String)

 Resets all values contained in this repository instance to their defaults.

        [Visual Basic]

Overloads Public Shared Sub ResetConfiguration( _
   ByVal repository As String _
)

        [C#]

public static void ResetConfiguration(
   string repository
);

Parameters

          repository

The repository to reset.

Remarks

 Reset all values contained in the repository instance to their defaults. This removes all appenders from all loggers, sets the level of all non-root loggers to null, sets their additivity flag to true and sets the level of the root logger to Debug. Moreover, message disabling is set to its default "off" value.

See Also

LogManager Class | log4net Namespace | LogManager.ResetConfiguration Overload List
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"><param name="Keyword" value="ResetConfiguration method"></param><param name="Keyword" value="ResetConfiguration method, LogManager class"></param><param name="Keyword" value="LogManager.ResetConfiguration method"></param></object>

Copyright 2004-2013 The Apache Software Foundation.

Apache log4net, Apache and log4net are trademarks of The Apache Software Foundation.


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Nomencl. Bot. 363 (1797)

#### Original name
Merulius labyrinthiformis Rauschert

### Remarks
null


text:
import React from "react";
import {useParams} from 'react-router';
import {WRITING} from "./data";
import {DynamicMarkdown,} from "./common";
import {Link} from "react-router-dom";

const Breadcrumb: React.FC<{crumbs: Array<[string, string]>}> = ({crumbs}) =>

    ← / {crumbs.map(([to, label]) => <Link to={to}>{label}</Link>)} /
  ;

const BlogItem = () => {
  const { blogId } = useParams() as { blogId: string,};

  return

    <Breadcrumb crumbs={[['/writing', 'Writing']]}/>

      <DynamicMarkdown articleId={blogId} />

};

const BlogPage = () =>

  {WRITING.map(w => {
    return (

        {w.label ? <a href={`/writing/${w.label}`}>
{w.title}
 :
{w.title}
}

{w.short}

    );
  })}

;

export {
  BlogPage,
  BlogItem,
};


text:
==================================================
Building and Distributing Packages with Setuptools
==================================================

The first step towards sharing a Python library or program is to build a
distribution package [#package-overload]_. This includes adding a set of
additional files containing metadata and configuration to not only instruct
``setuptools`` on how the distribution should be built but also
to help installer (such as :pypi:`pip`) during the installation process.

This document contains information to help Python developers through this
process. Please check the :doc:`/userguide/quickstart` for an overview of
the workflow.

Also note that ``setuptools`` is what is known in the community as :pep:`build
backend <517#terminology-and-goals>`, user facing interfaces are provided by tools
such as :pypi:`pip` and :pypi:`build`. To use ``setuptools``, one must
explicitly create a ``pyproject.toml`` file as described :doc:`/build_meta`.

Contents
========

.. toctree::
    :maxdepth: 1

    quickstart
    package_discovery
    dependency_management
    development_mode
    entry_point
    datafiles
    ext_modules
    distribution
    miscellaneous
    extension
    declarative_config
    pyproject_config

---

.. rubric:: Notes

.. [#package-overload]
   A :term:`Distribution Package` is also referred in the Python community simply as "package"
   Unfortunately, this jargon might be a bit confusing for new users because the term package
   can also to refer any :term:`directory <package>` (or sub directory) used to organize
   :term:`modules <module>` and auxiliary files.


text:
package hcube.scheduler.tasks

import java.util.concurrent.{Executors, TimeUnit}

import hcube.scheduler.utils.JavaUtil._

class TaskRunner(numberOfTasks: Int) {

  private val scheduler = Executors.newScheduledThreadPool(numberOfTasks)

  def schedule(command: () => Unit, delayMillis: Long): Unit = {

    @volatile var lastExecution = 0L
    def commandFn = () => {
      val now = System.currentTimeMillis()
      if (now - lastExecution >= delayMillis / 2) {
        command()
        lastExecution = now
      }
    }

    scheduler.scheduleAtFixedRate(
      commandFn, delayMillis, delayMillis, TimeUnit.MILLISECONDS)
  }

  def shutdown(): Unit = {
    scheduler.shutdown()
    scheduler.awaitTermination(10, TimeUnit.SECONDS)
  }
}


text:
package org.wso2.developerstudio.eclipse.gmf.esb.diagram.custom.deserializer;

import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__ALLOW_DELETE;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__ALLOW_GET;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__ALLOW_HEAD;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__ALLOW_OPTIONS;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__ALLOW_PATCH;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__ALLOW_POST;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__ALLOW_PUT;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__FAULT_SEQUENCE_KEY;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__FAULT_SEQUENCE_NAME;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__FAULT_SEQUENCE_TYPE;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__IN_SEQUENCE_KEY;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__IN_SEQUENCE_NAME;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__IN_SEQUENCE_TYPE;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__OUT_SEQUENCE_KEY;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__OUT_SEQUENCE_NAME;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__OUT_SEQUENCE_TYPE;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__PROTOCOL;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__URI_TEMPLATE;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__URL_MAPPING;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.API_RESOURCE__URL_STYLE;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.SYNAPSE_API__API_NAME;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.SYNAPSE_API__CONTEXT;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.SYNAPSE_API__HOST_NAME;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.SYNAPSE_API__PORT;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.SYNAPSE_API__STATISTICS_ENABLED;
import static org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage.Literals.SYNAPSE_API__TRACE_ENABLED;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

import org.apache.synapse.mediators.base.SequenceMediator;
import org.apache.synapse.rest.API;
import org.apache.synapse.rest.Handler;
import org.apache.synapse.rest.Resource;
import org.apache.synapse.rest.dispatch.DispatcherHelper;
import org.apache.synapse.rest.dispatch.URITemplateHelper;
import org.apache.synapse.rest.dispatch.URLMappingHelper;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.ui.forms.editor.FormEditor;
import org.wso2.developerstudio.eclipse.gmf.esb.APIHandler;
import org.wso2.developerstudio.eclipse.gmf.esb.APIHandlerProperty;
import org.wso2.developerstudio.eclipse.gmf.esb.APIResource;
import org.wso2.developerstudio.eclipse.gmf.esb.ApiResourceUrlStyle;
import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory;
import org.wso2.developerstudio.eclipse.gmf.esb.MediatorFlow;
import org.wso2.developerstudio.eclipse.gmf.esb.Protocol;
import org.wso2.developerstudio.eclipse.gmf.esb.RegistryKeyProperty;
import org.wso2.developerstudio.eclipse.gmf.esb.SequenceType;
import org.wso2.developerstudio.eclipse.gmf.esb.SynapseAPI;
import org.wso2.developerstudio.eclipse.gmf.esb.diagram.providers.EsbElementTypes;
import org.wso2.developerstudio.eclipse.gmf.esb.internal.persistence.custom.DummyHandler;

/**
 * Synapse API deserializer
 */
public class APIDeserializer extends AbstractEsbNodeDeserializer<API, SynapseAPI> {

	@Override
	public SynapseAPI createNode(IGraphicalEditPart part,API api) throws DeserializerException {
		SynapseAPI synapseAPI = (SynapseAPI) DeserializerUtils.createNode(part, EsbElementTypes.SynapseAPI_3668);
		setElementToEdit(synapseAPI);
		refreshEditPartMap();
		//api.configure(new AspectConfiguration(synapseAPI.getApiName()));
		if (api.getAspectConfiguration().isStatisticsEnable()) {
			executeSetValueCommand(SYNAPSE_API__STATISTICS_ENABLED, new Boolean(true));
		} else {
			executeSetValueCommand(SYNAPSE_API__STATISTICS_ENABLED, new Boolean(false));
		}
		if (api.getAspectConfiguration().isTracingEnabled()) {
			executeSetValueCommand(SYNAPSE_API__TRACE_ENABLED, new Boolean(true));
		} else {
			executeSetValueCommand(SYNAPSE_API__TRACE_ENABLED, new Boolean(false));
		}
		executeSetValueCommand(SYNAPSE_API__API_NAME, api.getAPIName());
		executeSetValueCommand(SYNAPSE_API__CONTEXT, api.getContext());
		if (api.getHost() != null) {
			executeSetValueCommand(SYNAPSE_API__HOST_NAME, api.getHost());
		}
		if (api.getPort() > 0) {
			executeSetValueCommand(SYNAPSE_API__PORT, api.getPort());
		}
		GraphicalEditPart apiCompartment = (GraphicalEditPart) getEditpart(synapseAPI).getChildren().get(0);
		Resource[] resources = api.getResources();

		int locationY = 0;

		for (int i = 0; i < resources.length; i++) {

			APIResource resource = (APIResource) DeserializerUtils.createNode(apiCompartment, EsbElementTypes.APIResource_3669);

			refreshEditPartMap();
			setElementToEdit(resource);

			List<String> methodList = Arrays.asList(resources[i].getMethods());
			executeSetValueCommand(API_RESOURCE__ALLOW_GET, methodList.contains("GET"));
			executeSetValueCommand(API_RESOURCE__ALLOW_POST, methodList.contains("POST"));
			executeSetValueCommand(API_RESOURCE__ALLOW_OPTIONS, methodList.contains("OPTIONS"));
			executeSetValueCommand(API_RESOURCE__ALLOW_DELETE, methodList.contains("DELETE"));
			executeSetValueCommand(API_RESOURCE__ALLOW_PUT, methodList.contains("PUT"));
			executeSetValueCommand(API_RESOURCE__ALLOW_HEAD, methodList.contains("HEAD"));
			executeSetValueCommand(API_RESOURCE__ALLOW_PATCH, methodList.contains("PATCH"));

			DispatcherHelper dispatcherHelper = resources[i].getDispatcherHelper();
			if(dispatcherHelper instanceof URITemplateHelper){
				URITemplateHelper helper = (URITemplateHelper) dispatcherHelper;
				executeSetValueCommand(API_RESOURCE__URL_STYLE, ApiResourceUrlStyle.URI_TEMPLATE);
				executeSetValueCommand(API_RESOURCE__URI_TEMPLATE, helper.getString());
			} else if(dispatcherHelper instanceof URLMappingHelper){
				URLMappingHelper helper = (URLMappingHelper) dispatcherHelper;
				executeSetValueCommand(API_RESOURCE__URL_STYLE,ApiResourceUrlStyle.URL_MAPPING);
				executeSetValueCommand(API_RESOURCE__URL_MAPPING, helper.getString());
			} else{
				executeSetValueCommand(API_RESOURCE__URL_STYLE,ApiResourceUrlStyle.NONE);
			}

			addRootInputConnector(resource.getInputConnector());
			MediatorFlow mediatorFlow = resource.getContainer().getSequenceAndEndpointContainer().getMediatorFlow();
			GraphicalEditPart compartment = (GraphicalEditPart)((getEditpart(mediatorFlow)).getChildren().get(0));

			int protocol = resources[i].getProtocol();
			if (protocol == 2) {
				executeSetValueCommand(API_RESOURCE__PROTOCOL, Protocol.HTTPS);
			} else if (protocol == 1) {
				executeSetValueCommand(API_RESOURCE__PROTOCOL, Protocol.HTTP);
			} else {
				executeSetValueCommand(API_RESOURCE__PROTOCOL,
						Protocol.HTTP_HTTPS);
			}

			SequenceMediator inSequence = resources[i].getInSequence();
			if(inSequence!=null){
				setRootCompartment(compartment);
				deserializeSequence(compartment, inSequence, resource.getOutputConnector());
				setRootCompartment(null);
			} else{
				String inSequenceName = resources[i].getInSequenceKey();
				if(inSequenceName!=null){
					if(inSequenceName.startsWith("/") || inSequenceName.startsWith("conf:") || inSequenceName.startsWith("gov:")){
						resource.setInSequenceType(SequenceType.REGISTRY_REFERENCE);
						RegistryKeyProperty keyProperty = EsbFactory.eINSTANCE.createRegistryKeyProperty();
						keyProperty.setKeyValue(inSequenceName);
						executeSetValueCommand(API_RESOURCE__IN_SEQUENCE_KEY, keyProperty);
					} else{
						executeSetValueCommand(API_RESOURCE__IN_SEQUENCE_TYPE, SequenceType.NAMED_REFERENCE);
						executeSetValueCommand(API_RESOURCE__IN_SEQUENCE_NAME, inSequenceName);
					}
				}
			}

			SequenceMediator outSequence = resources[i].getOutSequence();
			if(outSequence!=null){
				setRootCompartment(compartment);
				deserializeSequence(compartment, outSequence, resource.getInputConnector());
				setRootCompartment(null);
			} else{
				String outSequenceName = resources[i].getOutSequenceKey();
				if(outSequenceName!=null){
					if(outSequenceName.startsWith("/") || outSequenceName.startsWith("conf:") || outSequenceName.startsWith("gov:")){
						resource.setOutSequenceType(SequenceType.REGISTRY_REFERENCE);
						RegistryKeyProperty keyProperty = EsbFactory.eINSTANCE.createRegistryKeyProperty();
						keyProperty.setKeyValue(outSequenceName);
						executeSetValueCommand(API_RESOURCE__OUT_SEQUENCE_KEY, keyProperty);
					} else{
						executeSetValueCommand(API_RESOURCE__OUT_SEQUENCE_TYPE, SequenceType.NAMED_REFERENCE);
						executeSetValueCommand(API_RESOURCE__OUT_SEQUENCE_NAME, outSequenceName);
					}
				}
			}

			SequenceMediator faultSequence = resources[i].getFaultSequence();
			if(faultSequence!=null){
				MediatorFlow faultMediatorFlow = resource.getContainer().getFaultContainer().getMediatorFlow();
				GraphicalEditPart faultCompartment = (GraphicalEditPart)((getEditpart(faultMediatorFlow)).getChildren().get(0));
				setRootCompartment(faultCompartment);
				deserializeSequence(faultCompartment, faultSequence, resource.getFaultInputConnector());
				setRootCompartment(null);
			} else{
				String faultSequenceName = resources[i].getFaultSequenceKey();
				if(faultSequenceName!=null){
					if(faultSequenceName.startsWith("/") || faultSequenceName.startsWith("conf:") || faultSequenceName.startsWith("gov:")){
						resource.setFaultSequenceType(SequenceType.REGISTRY_REFERENCE);
						RegistryKeyProperty keyProperty = EsbFactory.eINSTANCE.createRegistryKeyProperty();
						keyProperty.setKeyValue(faultSequenceName);
						executeSetValueCommand(API_RESOURCE__FAULT_SEQUENCE_KEY, keyProperty);
					} else{
						executeSetValueCommand(API_RESOURCE__FAULT_SEQUENCE_TYPE, SequenceType.NAMED_REFERENCE);
						executeSetValueCommand(API_RESOURCE__FAULT_SEQUENCE_NAME, faultSequenceName);
					}
				}
			}

			addPairMediatorFlow(resource.getOutputConnector(),resource.getInputConnector());

			IGraphicalEditPart graphicalNode = (IGraphicalEditPart) AbstractEsbNodeDeserializer.getEditpart(resource);
			if(graphicalNode!=null){
				Rectangle rect = new Rectangle(new Point(), graphicalNode.getFigure().getPreferredSize()).getCopy();
				rect.x = 0;
				rect.y = locationY;
				SetBoundsCommand sbc = new SetBoundsCommand(graphicalNode.getEditingDomain(),
						"change location", new EObjectAdapter((View) graphicalNode.getModel()), rect);
				graphicalNode.getDiagramEditDomain().getDiagramCommandStack()
						.execute(new ICommandProxy(sbc));
				locationY += rect.height;
				locationY += 25;
			}
		}

		for(Handler handler : api.getHandlers()) {
			APIHandler apiHandler = EsbFactory.eINSTANCE.createAPIHandler();

			if(handler instanceof DummyHandler) {
				DummyHandler dummyHandler = (DummyHandler) handler;
				apiHandler.setClassName(dummyHandler.getClassName());
			} else {
				apiHandler.setClassName(handler.getClass().getName());
			}

			Iterator itr = handler.getProperties().keySet().iterator();
			while (itr.hasNext()) {
				APIHandlerProperty handlerProperty = EsbFactory.eINSTANCE.createAPIHandlerProperty();
				String propertyName = (String) itr.next();
				handlerProperty.setName(propertyName);
				handlerProperty.setValue((String)handler.getProperties().get(propertyName));
				apiHandler.getProperties().add(handlerProperty);

            }
            executeAddValueCommand(synapseAPI.getHandlers(), apiHandler, false);
		}

		return synapseAPI;
	}

}


text:
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

'use strict';
/* eslint-disable no-console */

// Handles the interaction with the Chrome Debugging Protocol. Allows to start,
// stop and abort tracing and return back the trace JSON as a stream.
// The evolution of the internal state machine, in absence of errors, is the
// following:
// IDLE > ATTACHING > TRACING > STOPPING > FLUSHING > IDLE
//
// STATE_IDLE:      waiting for a start() request.
// STATE_ATTACHING: got start(), attaching to the Chrome Debugging Protocol.
// STATE_TRACING:   attached and started tracing. Will stay in this state for
//                  |traceDurationMs| or until stop() or abort() are called.
// STATE_STOPPING:  timeout expired or stop() called. Ends tracing via CDP
//                  and waits for the events collection callback |onEvent_|.
// STATE_FLUSHING:  tracing ended but still attached to CDP. Reads back the
//                  event stream and passes it to the client via |onTraceChunk|.
class TracingController {
  static get ATTACH_TIMEOUT_MS() { return 3000; }
  static get FLUSH_TIMEOUT_MS() { return 2000000; }
  static get WAIT_FOR_DUMP_TIMEOUT_MS() { return 2000000; }
  static get STATE() {
    return {
      IDLE: 'idle',
      ATTACHING: 'attaching',
      TRACING: 'tracing',
      STOPPING: 'stopping',
      FLUSHING: 'flushing'
    };
  }

  constructor(traceDurationMs, categories) {
    this.traceDurationMs_ = traceDurationMs;
    this.categories_ = categories || '';
    this.onStateChange = undefined;
    this.onTraceChunk = undefined;
    this.onError = undefined;
    this.target_ = undefined;
    this.timer_ = undefined;
    this.events_ = [];
    this.trace_stream_handle_ = undefined;
    this.state_ = TracingController.STATE.IDLE;
    this.memoryDumpInProgress = false;
    this.waitForTraceInProgress = false;
    this.waitForDumpTimer = undefined;
    chrome.debugger.onEvent.addListener(this.onEvent_.bind(this));
    chrome.debugger.onDetach.addListener(this.onDetach_.bind(this));
  }

  start(useDebugFallback = false) {
    if (this.state_ !== TracingController.STATE.IDLE) {
      throw new Error('Cannot start in state ' + this.state_);
    }
    this.events_ = [];
    this.updateState_(TracingController.STATE.ATTACHING);
    this.timer_ = setTimeout(
        this.detach_.bind(this),
        TracingController.ATTACH_TIMEOUT_MS);

    // When using tracing via the debugger protocol, the specific page we attach
    // to is irrelevant (as long is not a worker or another special endpoint).
    // The most reliable choice is attaching to ourselves. The only gotcha is
    // that when debugging this extension, devtools attaches first to the
    // debugger protocol. In such case the onAttach_() method will fail and
    // the code there will fall back creating a background tab and attaching to
    // that one instead.
    if (useDebugFallback) {
      chrome.tabs.create({url: 'about:blank', active: false}, (function(tab) {
        this.target_ = { tabId: tab.id };
        chrome.debugger.attach(this.target_, '1.1', this.onAttach_.bind(this));
      }).bind(this));
      return;
    }
    this.target_ = { extensionId: chrome.runtime.id };
    chrome.debugger.attach(this.target_, '1.1', this.onAttach_.bind(this));
  }

  abort() {
    if (this.state_ === TracingController.STATE.IDLE) {
      return;
    }
    if (this.state_ === TracingController.STATE.TRACING) {
      this.stop();
    }
    this.detach_();
  }

  onWaitForTraceFinished() {
    if (this.state_ !== TracingController.STATE.TRACING) {
      return;
    }
    this.waitForTraceInProgress = false;
    clearTimeout(this.timer_);
    if (!this.memoryDumpInProgress) {
      this.stop();
    }
  }

  onMemoryDumpFinished(success, dumpGuid) {
    if (this.state_ !== TracingController.STATE.TRACING) {
      return;
    }
    this.memoryDumpInProgress = false;
    if (!this.waitForTraceInProgress) {
      this.stop();
    }
  }

  onWaitForDumpTimerFired() {
    if (this.state_ !== TracingController.STATE.TRACING) {
      return;
    }
    this.stop();
  }

  stop() {
    if (this.state_ !== TracingController.STATE.TRACING) {
      return;
    }
    clearTimeout(this.waitForDumpTimer);
    this.waitForDumpTimer = undefined;
    clearTimeout(this.timer_);
    this.timer_ = setTimeout(
        this.detachFromFlushTimeout_.bind(this),
        TracingController.FLUSH_TIMEOUT_MS);
    chrome.debugger.sendCommand(this.target_, 'Tracing.end');
    this.updateState_(TracingController.STATE.STOPPING);
  }

  onAttach_() {
    if (chrome.runtime.lastError !== undefined &&
        chrome.runtime.lastError.message.startsWith('Another debugger')) {
      console.log('Extension being debugged. Reattaching in fallback mode.');
      this.detach_();
      setTimeout(this.start.bind(this, true /* useDebugFallback */), 0);
      return;
    }
    this.checkForErrors_();
    const params =
        {categories: this.categories_, transferMode: 'ReturnAsStream'};
    chrome.debugger.sendCommand(
        this.target_,
        'Tracing.start',
        params,
        this.onTracingStarted_.bind(this));
  }

  onTracingStarted_() {
    this.checkForErrors_();
    clearTimeout(this.timer_);
    this.updateState_(TracingController.STATE.TRACING);

    // Wait for two events before stopping.
    //   1. Grab a single memory dump.
    //   2. Wait traceDurationMs_ to capture other trace events.
    this.memoryDumpInProgress = true;
    this.waitForTraceInProgress = true;
    this.waitForDumpTimer = setTimeout(
        this.onWaitForDumpTimerFired.bind(this),
        TracingController.WAIT_FOR_DUMP_TIMEOUT_MS);
    chrome.debugger.sendCommand(
        this.target_,
        'Tracing.requestMemoryDump',
        this.onMemoryDumpFinished.bind(this));

    this.timer_ = setTimeout(
        this.onWaitForTraceFinished.bind(this),
        this.traceDurationMs_);
  }

  detachFromFlushTimeout_() {
    chrome.extension.getBackgroundPage().console.log('Flush timeout');
    this.detach_();
  }

  detach_() {
    if (this.timer_) {
      clearTimeout(this.timer_);
      this.timer_ = undefined;
    }
    this.updateState_(TracingController.STATE.IDLE);
    chrome.debugger.detach(this.target_);
  }

  // Called if the user dismisses the "Chrome is being debugged" infobar.
  onDetach_() {
    this.updateState_(TracingController.STATE.IDLE);
  }

  onEvent_(source, method, params) {
    switch (method) {
      case 'Tracing.tracingComplete':
        this.updateState_(TracingController.STATE.FLUSHING);
        this.trace_stream_handle_ = params.stream;
        this.readBackNextChunk_();
        break;
    }
  }

  readBackNextChunk_() {
    const args = { handle: this.trace_stream_handle_, size: 128 * 1024 };
    chrome.debugger.sendCommand(this.target_, 'IO.read', args,
        this.onTraceReadback_.bind(this));
  }

  onTraceReadback_(params) {
    // Weird, sometimes |params| is undefined.
    if (params === undefined) {
      return;
    }

    if (this.onTraceChunk !== undefined) {
      this.onTraceChunk(params.data, params.eof);
    }

    if (params.eof) {
      clearTimeout(this.timer_);
      this.detach_();
      return;
    }

    setTimeout(this.readBackNextChunk_.bind(this), 0);
  }

  updateState_(state) {
    this.state_ = state;
    chrome.extension.getBackgroundPage().console.log(
        'TracingController state: ' + state);
    if (this.onStateChange !== undefined) {
      this.onStateChange(state);
    }
  }

  checkForErrors_(errCondition, errMsg) {
    const lastError = chrome.runtime.lastError;
    errCondition = errCondition || (lastError !== undefined);
    if (!errCondition) {
      return;
    }
    errMsg = errMsg || (lastError ? lastError.message : 'unknown error');
    if (this.onError !== undefined) {
      this.onError(errMsg);
    }
    this.detach_();
    throw new Error(errMsg);
  }

  get traceDurationMs() { return this.traceDurationMs_; }
}


text:
#include "CLogicBase.h"

void	CLogicBase::BeginScript()
{
	inherited::BeginScript();

	ProgramFixedVar(iHeight, 0);
	ProgramLongVar(iVerticalRangeMin, -1);
	ProgramLongVar(iVerticalRangeMax, -1);
}

CAbstractActor *
		CLogicBase::EndScript()
{
	if(inherited::EndScript() == this)
	{
		GetLastArcLocation(location);
		location[1] = ReadFixedVar(iHeight) + ReadFixedVar(iBaseHeight);
		location[3] = ReadFixedVar(iVerticalRangeMax);
		location[4] = ReadFixedVar(iVerticalRangeMin);

		return this;
	}
	else
		return NULL;
}

void	CLogicBase::FrameAction()
{
	short	i;
	Boolean	triggered = false;

	inherited::FrameAction();

	if(isActive & kHasMessage)
	{	isActive &= ~kHasMessage;

		for(i=0;i<LOGIC_IN;i++)
		{
			if(in[i].triggerCount)
			{	triggered = true;
			}

			in[i].triggerCount = 0;
		}

		itsGame->baseLocation = location;
		if(enabled && triggered)
		{	for(i=0;i<LOGIC_OUT;i++)
			{	itsGame->FlagImmediateMessage(out[i]);
			}

			if(!restart)
			{	Dispose();
				return;
			}
		}
	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentValidation;
using SharperArchitecture.Common.Events;
using SharperArchitecture.Common.Specifications;

namespace SharperArchitecture.Validation.Events
{
    public class ValidatorCreatedEvent : IEvent
    {
        public ValidatorCreatedEvent(IValidator validator, Type modelType)
        {
            Validator = validator;
            ModelType = modelType;
        }

        public IValidator Validator { get; }

        public Type ModelType { get; }
    }
}


text:
Examples of aiozmq usage
========================

There is a list of examples from `aiozmq/examples <https://github.com/aio-libs/aiozmq/tree/master/examples>`_

Every example is a correct tiny python program.

.. _aiozmq-examples-core-dealer-router:

Simple DEALER-ROUTER pair implemented on Core level
---------------------------------------------------

.. literalinclude:: ../examples/core_dealer_router.py

.. _aiozmq-examples-stream-dealer-router:

DEALER-ROUTER pair implemented with streams
-------------------------------------------

.. literalinclude:: ../examples/stream_dealer_router.py

.. _aiozmq-examples-rpc-rpc:

Remote Procedure Call
---------------------

.. literalinclude:: ../examples/rpc_simple.py

.. _aiozmq-examples-rpc-pipeline:

Pipeline aka Notifier
---------------------

.. literalinclude:: ../examples/rpc_pipeline.py

.. _aiozmq-examples-rpc-pubsub:

Publish-Subscribe
-----------------

.. literalinclude:: ../examples/rpc_pubsub.py

.. _aiozmq-examples-rpc-exception-trasnslator:

Translation RPC exceptions back to client
-----------------------------------------

.. literalinclude:: ../examples/rpc_exception_translator.py

.. _aiozmq-examples-rpc-custom-value-trasnslator:

Translation instances of custom classes via RPC
------------------------------------------------

.. literalinclude:: ../examples/rpc_custom_translator.py

.. _aiozmq-examples-rpc-incorrect-calls:

Validation of RPC methods
--------------------------

.. literalinclude:: ../examples/rpc_incorrect_calls.py

.. _aiozmq-examples-rpc-subhandlers:

RPC lookup in nested namespaces
-------------------------------

.. literalinclude:: ../examples/rpc_with_subhandlers.py

.. _aiozmq-examples-rpc-dict-handler:

Use dict as RPC lookup table
----------------------------

.. literalinclude:: ../examples/rpc_dict_handler.py

.. _aiozmq-examples-rpc-dynamic-handler:

Use dynamic RPC lookup
----------------------

.. literalinclude:: ../examples/rpc_dynamic.py

.. _aiozmq-examples-socket-event-monitor:

Socket event monitor
--------------------

.. literalinclude:: ../examples/socket_event_monitor.py

.. _aiozmq-examples-stream-socket-event-monitor:

Stream socket event monitor
---------------------------

.. literalinclude:: ../examples/stream_monitor.py

.. _aiozmq-examples-sync-async:

Synchronous and asynchronous code works together
-------------------------------------------------

.. literalinclude:: ../examples/sync_async.py


text:
#pragma once

#include "cinder/audio/Buffer.h"

#include <list>
#include <atomic>
#include <functional>
#include <string>

namespace cinder { namespace audio {

typedef std::shared_ptr<class Context>		ContextRef;
typedef std::shared_ptr<class Node>			NodeRef;

//! A Reference to Event's returned by the ramping methods. \see applyRamp() \see appendRamp()
typedef std::shared_ptr<class Event>			EventRef;
//! Ramping function that determines the curvature of a ramp.
typedef std::function<void ( float *, size_t, double, double, float, float )>	RampFn;

//! Array-based linear ramping function.
void rampLinear( float *array, size_t count, double t, double tIncr, float valueBegin, float valueEnd );
//! Array-based quadradic (t^2) ease-in ramping function.
void rampInQuad( float *array, size_t count, double t, double tIncr, float valueBegin, float valueEnd );
//! Array-based quadradic (t^2) ease-out ramping function.
void rampOutQuad( float *array, size_t count, double t, double tIncr, float valueBegin, float valueEnd );

//! Class representing a sample-accurate parameter control instruction. \see Param::applyRamp(), Param::appendRamp()
class Event {
  public:
	double getTimeBegin()		const	{ return mTimeBegin; }
	double getTimeEnd()			const	{ return mTimeEnd; }
	double getDuration()		const	{ return mDuration; }
	//! \note if getCopyValueOnBegin() is true then the begin value may not be known until the Event begins to be processed.
	float getValueBegin()		const	{ return mValueBegin; }
	float getValueEnd()			const	{ return mValueEnd; }
	const RampFn& getRampFn()	const	{ return mRampFn; }
	//! Returns whether the Param's current value will be copied when this Event begins or not.
	bool getCopyValueOnBegin()  const	{ return mCopyValueOnBegin; }
	//! Sets the value that will be used when this Event begins.
	void setValueBegin( float value )	{ mValueBegin = value; mCopyValueOnBegin = false; }

	void cancel()				{ mIsCanceled = true; }
	bool isComplete() const		{ return mIsComplete; }

	//! Returns the label that was assigned when the Event was created, or an empty string. Useful when debugging.
	const std::string&	getLabel() const	{ return mLabel; }

  private:
	Event( double timeBegin, double timeEnd, float valueBegin, float valueEnd, bool copyValueOnBegin, const RampFn &rampFn );

	double				mTimeBegin, mTimeEnd, mTimeCancel, mDuration;
	float				mValueBegin, mValueEnd;
	std::atomic<bool>	mIsComplete, mIsCanceled;
	bool				mCopyValueOnBegin;
	std::string			mLabel;
	RampFn				mRampFn;

	friend class Param;
};

//! \brief Allows an audio parameter to be controlled over time with sample accurate curves.

//! The Param class enables expressive control over variables that control audio::Node's with a Timeline-esque API.
//! It supports appending 'ramps' (audio animations) and maintains these in an internal timeline that is evaluated from the audio thread.
//! You can also set a Node as the 'processor' with Param::setProcessor(), enabling you to control it with an arbitrary signal.
//!
//! A Param is owned by a parent Node, from which it gains access to the current Context.  This is a necessary step in making it sample
//! accurate yet still controllable in a thread-safe manager on the user thread.
//!
//! \note Ramp Events should not overlap, or you may get discontinuities in the evaluated curve. This could potentially happen when
//! using multiple appendRamp() calls. Instead, use applyRamp() and set Options::beginTime() accordingly, which will remove any
//! Events that would otherwise be overlapping.
class Param {
  public:

	//! Optional parameters when applying or appending ramps. \see applyRamp() \see appendRamp()
	struct Options {
		Options() : mDelay( 0 ), mBeginTime( -1 ), mRampFn( rampLinear ) {}

		//! Specifies a delay of \a delay in seconds.
		Options& delay( double delay )				{ mDelay = delay; return *this; }
		//! Specifies the begin time in seconds. If this is value is greater or equal to zero, delay() is ignored.
		Options& beginTime( double time )			{ mBeginTime = time; return *this; }
		//! Specifies the ramping function used during evaluation.
		Options& rampFn( const RampFn &rampFn )		{ mRampFn = rampFn; return *this; }
		//! Sets a label that will be assigned to the Event. Useful when debugging.
		Options& label( const std::string &label )	{ mLabel = label; return *this; }

		//! Returns the delay specified in seconds.
		double				getDelay() const		{ return mDelay; }
		//! Returns the begin time specified in seconds.
		double				getBeginTime() const	{ return mBeginTime; }
		//! Returns the ramping function that will be used during evaluation.
		const RampFn&		getRampFn() const		{ return mRampFn; }
		//! Returns a label that will be assigned to the Event. Useful when debugging.
		const std::string&	getLabel() const		{ return mLabel; }

	  private:
		double	mDelay, mBeginTime;
		RampFn	mRampFn;
		std::string	mLabel;
	};

	//! Constructs a Param with a pointer (weak reference) to the owning parent Node and an optional \a initialValue (default = 0).
	Param( Node *parentNode, float initialValue = 0 );

	//! Sets the value of the Param, blowing away any scheduled Event's or processing Node. \note Must be called from a non-audio thread.
	void	setValue( float value );
	//! Returns the current value of the Param.
	float	getValue() const	{ return mValue; }
	//! Returns a pointer to the buffer used when evaluating a Param that is varying over the current processing block, of equal size to the owning Context's frames per block.
	//! \note If not varying (eval() returns false), the returned pointer will be invalid.

	//! Returns an array of values, time varying if `Event`s were processed, or filled with the a constant value if there were no `Event`s this block. \note Must call eval() once per block before using this method.
	const float*	getValueArray();

	//! Apply a ramp Event from the current value to \a valueEnd over \a rampSeconds, replacing any existing Events when this one begins. Any existing processing Node is disconnected. \see Options.
	EventRef applyRamp( float valueEnd, double rampSeconds, const Options &options = Options() );
	//! Apply a ramp Event from t\a valueBegin to \a valueEnd over \a rampSeconds, replacing any existing Events when this one begins. Any existing processing Node is disconnected. \see Options.
	EventRef applyRamp( float valueBegin, float valueEnd, double rampSeconds, const Options &options = Options() );
	//! Appends a ramp Event onto the end of the last scheduled Event (or the current time) to \a valueEnd over \a rampSeconds, according to \a options. Any existing processing Node is disconnected.
	EventRef appendRamp( float valueEnd, double rampSeconds, const Options &options = Options() );
	//! Appends an ramp Event onto the end of the last scheduled Event (or the current time), from \a valueBegin to \a valueEnd over \a rampSeconds, according to \a options. Any existing processing Node is disconnected.
	EventRef appendRamp( float valueBegin, float valueEnd, double rampSeconds, const Options &options = Options() );

	//! Sets this Param's input to be the processing performed by \a node. Any existing Event's are discarded. \note Forces \a node to be mono.
	void	setProcessor( const NodeRef &node );
	//! Returns this Param's processing Node, or an empty NodeRef if none is set.
	NodeRef	getProcessor() const	{ return mProcessor; }

	//! Resets Param, blowing away any Event's or processing Node. \note Must be called from a non-audio thread.
	void reset();
	//! Returns the number of Event's that are currently scheduled.
	size_t getNumEvents() const;

	//! Evaluates the Param for the current processing block, with current time determined from the parent Node's Context.
	//! \return true if the Param is varying this block (there are Event's or a processing Node) and getValueArray() should be used, or false if the Param's value is constant for this block (use getValue()).
	//! \note Safe to call on the audio thread.
	bool	eval();
	//! Evaluates the Param from \a timeBegin for \a arrayLength samples at \a sampleRate.
	//! \return true if the Param is varying this block (there are Event's or a processing Node) and getValueArray() should be used, or false if the Param's value is constant for this block (use getValue()).
	//! \note Safe to call on the audio thread.
	bool	eval( double timeBegin, float *array, size_t arrayLength, size_t sampleRate );

	//! Returns the total duration of any scheduled Event's, including delay, or 0 if none are scheduled.
	float					findDuration() const;
	//! Returns the end time and value of the latest scheduled Event, or [0, getValue()] if none are scheduled.
	std::pair<double, float> findEndTimeAndValue() const;

  protected:

	// non-locking protected methods
	void		initInternalBuffer();
	void		resetImpl();
	void		removeEventsAt( double time );
	ContextRef	getContext() const;

	std::list<EventRef>	mEvents;
	std::atomic<float>	mValue;
	bool				mIsVaryingThisBlock;
	Node*				mParentNode;
	NodeRef				mProcessor;
	BufferDynamic		mInternalBuffer;
};

} } // namespace cinder::audio


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Foundation.ObjectHydrator.Interfaces;
using Foundation.ObjectHydrator.Generators;

namespace Foundation.ObjectHydrator.Generators
{
    public class GenderGenerator : IGenerator<string>
    {

        public string Generate()
        {
            return ((IGenerator<string>)new FromListGetSingleGenerator<string>(new List<string> { "Male", "Female" })).Generate();
        }
    }
}


text:
/*
 *
 *This class is here for basic reference of the main class code layout and to be
 *able to just copy and paste the base code.
 *
 *
 */

package org.usfirst.frc.team619.robot;

import org.usfirst.frc.team619.hardware.TalonCan;
import org.usfirst.frc.team619.hardware.Talon;
import org.usfirst.frc.team619.logic.ThreadManager;
import org.usfirst.frc.team619.logic.mapping.SwerveDriveMappingThread;
import org.usfirst.frc.team619.subsystems.DriverStation;
import org.usfirst.frc.team619.subsystems.drive.SwerveDriveBase;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class SwerveTest extends IterativeRobot {

	//declare all variables and objects here

	//Basics
	ThreadManager threadManager;
	DriverStation driverStation;

	//Logic
	SwerveDriveMappingThread driveThread;

	//Subsystems
	SwerveDriveBase driveBase;

	//Hardware
	TalonCan turnLeft;
	TalonCan turnRight;
	TalonCan turnLeft2;
	TalonCan turnRight2;

	Talon driveLeft;
	Talon driveRight;
	Talon driveLeft2;
	Talon driveRight2;

	/**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    public void robotInit() {
    	System.out.println("\n");// shows code is working
        System.out.println("//////////////////////////////////////////////////////");
        System.out.println("// Cavalier Robotics                     TEAM 619   //");
        System.out.println("// 2015 Jenga                                       //");
        System.out.println("//////////////////////////////////////////////////////\n");

        //Create all robot subsystems (i.e. stuff from/for org.usfirst.frc.team619.subsystems)
        //If you are creating something not from/for org.usfirst.frc.team619.subsystems, YER DOING IT WRONG

        //threadManager
        threadManager = new ThreadManager();

        //driver station
        driverStation = new DriverStation(1, 2);

        //TalonCan
        turnLeft = new TalonCan(1);
        turnRight = new TalonCan(2);
        turnLeft2 = new TalonCan(3);
        turnRight2 = new TalonCan(4);

        //Talon
        driveLeft = new Talon(0);
        driveRight = new Talon(1);
        driveLeft2 = new Talon(2);
        driveRight2 = new Talon(3);

        //subsystems
        driveBase = new SwerveDriveBase(driveLeft, driveRight, driveLeft2, driveRight2);
    }

    /**
     *This function is called when autonomous is initialized
     */
    public void autonomousInit(){
    	threadManager.killAllThreads(); // DO NOT EVER REMOVE!!!
    	turnLeft.set(0.25);
    	turnRight.set(0.25);
    	turnLeft2.set(0.25);
    	turnRight2.set(0.25);
    	driveLeft.set(0.25);
    	driveRight.set(0.25);
    	driveLeft.set(0.25);
    	driveRight2.set(0.25);
    	driveLeft2.set(0.25);
    }
    /**
     * This function is called when teleop is initialized
     */
    public void teleopInit(){
    	threadManager.killAllThreads(); // DO NOT EVER REMOVE!!!

        //driveThread = new TurnDriveMappingThread(driveBase, driverStation, 15, threadManager);
        //driveThread.start();
    }
    /**
     * This function is called periodically (about every 20 ms) during autonomous
     */
    public void autonomousPeriodic(){

    }
    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
//        SmartDashboard.putNumber("FLTurn: ", driveBase.getLeftTurn().getSpeed());
//        SmartDashboard.putNumber("FRTurn: ", driveBase.getRightTurn().getSpeed());
//        SmartDashboard.putNumber("BLTurn: ", driveBase.getLeftTurn2().getSpeed());
//        SmartDashboard.putNumber("BRTurn: ", driveBase.getRightTurn2().getSpeed());
/*        SmartDashboard.putNumber("FL: ", driveBase.getLeftTalon().getSpeed());
        SmartDashboard.putNumber("FR: ", driveBase.getRightTalon().getSpeed());
        SmartDashboard.putNumber("BL: ", driveBase.getLeftTalon2().getSpeed());
        SmartDashboard.putNumber("BR: ", driveBase.getRightTalon2().getSpeed());
*/    }
    /**
     * This function is called periodically during test mode
     */
    public void testPeriodic() {

    }
    public void disabledInit(){
    	threadManager.killAllThreads(); // DO NOT EVER REMOVE!!!
    }

    public void disabledPeriodic(){}

    public void disabledContinuous(){}

}


text:
<?php
// grab the test parameters
require_once("karmadatadesign.php");
// grab the class to test
require_once(dirname(__DIR__) . "/public_html/php/classes/member.php");
require_once(dirname(__DIR__) . "/public_html/php/classes/profile.php");
require_once(dirname(__DIR__) . "/public_html/php/classes/need.php");

/**
 * Full PHPUnit test for the Need class
 *
 * This is a complete PHPUnit test of the Need class. It is complete because *ALL* mySQL/PDO enabled methods
 * are tested for both invalid and valid inputs.
 *
 * @see Need
 * @author Gerald Fongwe <gfongwe@cnm.edu>
 **/
class NeedTest extends KarmaDataDesign {
	/**
	 * valid NeedDescription to use
	 * @var string $VALID_NEEDDESCRIPTION
	 **/
	protected $VALID_NEEDDESCRIPTION = "this is a good description";

	protected $VALID_OTHER_NEED_DESCRIPTION = "this is a second good description";
	/**
	 * valid needFulfilled to use
	 * @var int $VALID_NEEDFULFILLED
	 **/
	protected $VALID_NEEDFULFILLED = 1;
	/**
	 * valid needTitle to use
	 * @var string $VALID_NEEDTITLE
	 **/
	protected $VALID_NEEDTITLE = "Geralds Need";

	/**
	 * member to use during test -- foreign key for Profile
	 * @var Member $member
	 **/
	protected $member;

	/**
	 * profile to use during test -- foreign key
	 * @var Profile $profile
	 */
	protected $profile;

	/**
	 * email activation string to use for this test
	 * $var string $VALID_EMAIL_ACTIVATION
	 */
	protected $VALID_EMAIL_ACTIVATION = "0123456789abcdef";

	/**
	 * create dependent objects before running each test
	 **/
	public final function setUp() {
		// run the default setUp() method first
		parent::setUp();

		$salt = bin2hex(openssl_random_pseudo_bytes(32));
		$hash = hash_pbkdf2("sha512", "bootcamp-coders", $salt, 4096, 128);

		//create and insert a Message to own the test
		$this->member = new Member(null, "s", "blurb1@gail.com", $this->VALID_EMAIL_ACTIVATION, $hash, $salt);
		$this->member->insert($this->getPDO());

		$this->profile = new Profile(null, $this->member->getMemberId(), "stuff about me","it is me", "Derek","Mauldin", null  );
		$this->profile->insertProfile($this->getPDO());

	}
	/**Need test is now passing.
	$this->member->insert($this->getPDO());

	//create and insert a Profile to own the test
	$this->profile = new Profile(null, $this->member->getMemberId(), "itsOk", "whatIsGoingOn", "john", "paul", null, null);
	$this->profile->insertProfile($this->getPDO());

	}
	/**
	 * test inserting a valid Need and verify that the actual mySQL data matches
	 **/
	public function testInsertValidNeed() {
		// count the number of rows and save it for later
		$numRows = $this->getConnection()->getRowCount("need");

		// create a new Need and insert to into mySQL
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);
		$need->insert($this->getPDO());

		// grab the data from mySQL and enforce the fields match our expectations
		$pdoNeed = Need::getNeedByNeedId($this->getPDO(), $need->getNeedId());
		$this->assertSame($numRows + 1, $this->getConnection()->getRowCount("need"));
		$this->assertSame($pdoNeed->getProfileId(), $need->getProfileId());
		$this->assertSame($pdoNeed->getNeedDescription(), $this->VALID_NEEDDESCRIPTION);
		$this->assertSame($pdoNeed->getNeedFulfilled(), $this->VALID_NEEDFULFILLED);
		$this->assertSame($pdoNeed->getNeedTitle(), $this->VALID_NEEDTITLE);
	}

	/**
	 * test inserting a Need that already exists
	 *
	 * @expectedException PDOException
	 **/
	public function testInsertInvalidNeed() {

		// create a need with a non null needId and watch it fail
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);
		$need->insert($this->getPDO());

		// insert agian and watch it fail
		$need->insert($this->getPDO());
	}

	/**
	 * test inserting a Need, editing it, and then updating it
	 **/
	public function testUpdateValidNeed() {

		// count the number of rows and save it for later
		$numRows = $this->getConnection()->getRowCount("need");

		// create a new Profile and insert to into mySQL
		$need = new Need(null,$this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE );
		$need->insert($this->getPDO());

		// edit the Profile and update it in mySQL
		$need->setNeedDescription($this->VALID_OTHER_NEED_DESCRIPTION);
		$need->update($this->getPDO());

		// grab the data from mySQL and enforce the fields match our expectations
		$pdoNeed = Need::getNeedByNeedId($this->getPDO(), $need->getNeedId());
		$this->assertSame($numRows + 1, $this->getConnection()->getRowCount("need"));
		$this->assertSame($pdoNeed->getNeedId(), $need->getNeedId());
		$this->assertSame($pdoNeed->getProfileId(), $need->getProfileId());
		$this->assertSame($pdoNeed->getNeedDescription(), $need->getNeedDescription());
		$this->assertSame($pdoNeed->getNeedFulfilled(), $need->getNeedFulfilled());
		$this->assertSame($pdoNeed->getNeedTitle(), $need->getNeedTitle());

	}

	/**
	 * test updating a Need that does not exist
	 *
	 * @expectedException PDOException
	 **/
	public function testUpdateInvalidNeed() {

		// create a Need and try to update it without actually inserting it
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);

		$need->update($this->getPDO());

	}

	/**
	 * test creating a Need and then deleting it
	 **/
	public function testDeleteValidNeed() {

		// count the number of rows and save it for later
		$numRows = $this->getConnection()->getRowCount("need");

		// create a new Need and insert to into mySQL
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);
		$need->insert($this->getPDO());

		// delete the Message from mySQL
		$this->assertSame($numRows + 1, $this->getConnection()->getRowCount("need"));
		$need->delete($this->getPDO());

		// grab the data from mySQL and enforce the Need does not exist
		$pdoNeed = Need::getNeedByNeedId($this->getPDO(), $need->getNeedId());
		$this->assertNull($pdoNeed);
		$this->assertSame($numRows, $this->getConnection()->getRowCount("need"));
	}

	/**
	 * test deleting a Need that does not exist
	 *
	 * @expectedException PDOException
	 **/
	public function testDeleteInvalidNeed() {

		// create a Need and try to delete it without actually inserting it
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);

		$need->delete($this->getPDO());

	}

	/**
	 * test inserting a Need and regrabbing it from mySQL
	 **/
	public function testGetValidNeedByNeedId() {

		// count the number of rows and save it for later
		$numRows = $this->getConnection()->getRowCount("need");

		// create a new Need and insert into mySQL
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);
		$need->insert($this->getPDO());

		// grab the data from mySQL and enforce the fields match our expectations
		$pdoNeed = Need::getNeedByNeedId($this->getPDO(), $need->getNeedId());
		$this->assertSame($numRows + 1, $this->getConnection()->getRowCount("need"));
		$this->assertSame($pdoNeed->getProfileId(), $need->getProfileId());
		$this->assertSame($pdoNeed->getNeedDescription(), $this->VALID_NEEDDESCRIPTION);
		$this->assertSame($pdoNeed->getNeedFulfilled(), $this->VALID_NEEDFULFILLED);
		$this->assertSame($pdoNeed->getNeedTitle(), $this->VALID_NEEDTITLE);

	}

	/**
	 * test grabbing a Need that does not exist
	 **/
	public function testGetInvalidNeedByNeedId() {

		// grab a Need that exceeds the maximum allowable need
		$need = Need::getNeedByNeedId($this->getPDO(), KarmaDataDesign::INVALID_KEY);
		$this->assertNull($need);

	}

	/**
	 * test grabbing a need by profileId
	 */

	public function testGetNeedsByProfileId() {

		// count the number of rows and save it for later
		$numRows = $this->getConnection()->getRowCount("need");

		// create a new Need and insert into mySQL
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);
		$need->insert($this->getPDO());

		$pdoNeeds = Need::getNeedsByProfileId($this->getPDO(), $need->getProfileId());
		$this->assertTrue($pdoNeeds->count() > 0);

		foreach($pdoNeeds as $pdoNeed) {
			if($pdoNeed->getProfileId() === $need->getProfileId()) {
				// grab the data from mySQL and enforce the fields match our expectations
				$this->assertSame($numRows + 1, $this->getConnection()->getRowCount("need"));
				$this->assertSame($pdoNeed->getProfileId(), $need->getProfileId());
				$this->assertSame($pdoNeed->getNeedDescription(), $need->getNeedDescription());
				$this->assertSame($pdoNeed->getNeedFulfilled(), $need->getNeedFulfilled());
				$this->assertSame($pdoNeed->getNeedTitle(), $need->getNeedTitle());
			}
		}
	}

	/**
	 * test grabbing a Need by a profile that does not exist
	 **/
	public function testGetInvalidNeedByProfileId() {

		// grab a Need that exceeds the maximum allowable need
		$pdoNeeds = Need::getNeedsByProfileId($this->getPDO(), KarmaDataDesign::INVALID_KEY);
		$this->assertTrue($pdoNeeds->count() === 0);

	}

	/**
	 * test grabbing a need by need title
	 */

	public function testGetNeedByNeedTitle() {

		// count the number of rows and save it for later
		$numRows = $this->getConnection()->getRowCount("need");

		// create a new Need and insert into mySQL
		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);
		$need->insert($this->getPDO());

		// grab the data from mySQL and enforce the fields match our expectations
		$pdoNeeds = Need::getNeedByNeedTitle($this->getPDO(), $need->getNeedTitle());
		foreach($pdoNeeds as $pdoNeed) {
			$this->assertSame($numRows + 1, $this->getConnection()->getRowCount("need"));
			$this->assertSame($pdoNeed->getProfileId(), $this->profile->getProfileId());
			$this->assertSame($pdoNeed->getNeedDescription(), $this->VALID_NEEDDESCRIPTION);
			$this->assertSame($pdoNeed->getNeedFulfilled(), $this->VALID_NEEDFULFILLED);
			$this->assertSame($pdoNeed->getNeedTitle(), $this->VALID_NEEDTITLE);
		}
	}

	/**
	 * test grabbing a Need by a Title that does not exist
	 **/
	public function testGetInvalidNeedByNeedTitle() {

		$need = new Need(null, $this->profile->getProfileId(), $this->VALID_NEEDDESCRIPTION, $this->VALID_NEEDFULFILLED, $this->VALID_NEEDTITLE);
		$need->insert($this->getPDO());

		// grab a Need that exceeds the maximum allowable need
		$need = Need::getNeedByNeedTitle($this->getPDO(), "does not exist");
		$this->assertNull($need);
	}

}


text:
<?php

namespace Seeren\Log\Logger;

class Monthly extends AbstractLogger
{

    protected function getFileName(): string
    {
        return date('Y-m');
    }

    protected function getLogName(): string
    {
        return date('d.H:i:s');
    }

}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Title</title>


text:
TEST_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"` | grep -o '.*/oshinko-s2i/test/e2e')
source $TEST_DIR/common

SCRIPT_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"`)
source $SCRIPT_DIR/../../builddc

TEMPLATE_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"` | grep -o '.*/oshinko-s2i')/templates
set_template $TEMPLATE_DIR/scaladc.json
set_worker_count $S2I_TEST_WORKERS

# Clear these flags
set_fixed_app_name

os::test::junit::declare_suite_start "$MY_SCRIPT"

function poll_build() {
    # override poll_build from builddc because
    # in this case we never do a build beyond the
    # binary build we do directly, so polls will break!
    return
}

set_git_uri https://github.com/radanalyticsio/s2i-integration-test-apps
set_app_main_class org.apache.spark.examples.SparkPi

# Make the S2I test image if it's not already in the project
make_image $S2I_TEST_IMAGE_SCALA $GIT_URI
set_image $TEST_IMAGE

echo "++ dc_test_no_app_name"
dc_test_no_app_name

echo "++ test_exit"
test_exit

echo "++ test_cluster_name"
test_cluster_name

echo "++ test_del_cluster"
test_del_cluster

echo "++ test_app_args"
test_app_args

echo "++ test_pod_info"
test_podinfo

echo "++ test_named_config"
test_named_config

echo "++ test_driver_config"
test_driver_config

echo "++ test_spark_options"
test_spark_options

echo "++ test_driver_host"
test_driver_host

echo "++ test_no_source_or_image"
test_no_source_or_image

os::test::junit::declare_suite_end