text:
package org.apache.mxnet

import org.apache.mxnet.utils.CToScalaUtils
import org.scalatest.{BeforeAndAfterAll, FunSuite}
import org.slf4j.LoggerFactory

class MacrosSuite extends FunSuite with BeforeAndAfterAll {

  private val logger = LoggerFactory.getLogger(classOf[MacrosSuite])

  test("MacrosSuite-testArgumentCleaner") {
    val input = List(
      "Symbol, optional, default = Null",
      "int, required",
      "Shape(tuple), optional, default = []",
      "{'csr', 'default', 'row_sparse'}, optional, default = 'csr'",
      ", required"
    )
    val output = List(
      ("org.apache.mxnet.Symbol", true),
      ("Int", false),
      ("org.apache.mxnet.Shape", true),
      ("String", true),
      ("Any", false)
    )

    for (idx <- input.indices) {
      val result = CToScalaUtils.argumentCleaner(input(idx), "org.apache.mxnet.Symbol")
      assert(result._1 === output(idx)._1 && result._2 === output(idx)._2)
    }
  }

}


text:
//
// This code was auto-generated by AFNOR StoredProcedureSystem, version 1.0
//

using Bivi.Data.Context;
using Bivi.Domaine;
using Bivi.Business.Depots;
using System.Linq;

namespace Bivi.Data.Depots
{
    public partial class DepotLien_TypeRenduBloc_TypeContenu : Depot<Lien_TypeRenduBloc_TypeContenu>, IDepotLien_TypeRenduBloc_TypeContenu
    {
        /// <summary>
        /// Initialise une nouvelle instance du dépôt.
        /// </summary>
        /// <param name="dataContext">Contexte de la base de donnée.</param>
        public DepotLien_TypeRenduBloc_TypeContenu(IBiviDbContext dataContext)
            : base(dataContext)
        {
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using EasyRpc.AspNetCore.Errors;
using EasyRpc.AspNetCore.Features;
using EasyRpc.AspNetCore.Filters;
using EasyRpc.AspNetCore.Routing;
using EasyRpc.AspNetCore.Serializers;
using Microsoft.AspNetCore.Http;

namespace EasyRpc.AspNetCore.EndPoints.MethodHandlers
{
    /// <summary>
    /// Base end point method handler
    /// </summary>
    public abstract class BaseContentEndPointMethodHandler<TReturn> : IEndPointMethodHandler
    {

        /// <summary>
        /// Method for binding parameters
        /// </summary>
        protected MethodEndPointDelegate BindParametersDelegate;

        /// <summary>
        /// Invoke method delegate
        /// </summary>
        protected InvokeMethodDelegate<TReturn> InvokeMethodDelegate;

        /// <summary>
        /// Response delegate
        /// </summary>
        protected MethodEndPointDelegate ResponseDelegate;

        /// <summary>
        /// instance activation function
        /// </summary>
        protected Func<RequestExecutionContext, object> ActivationFunc;

        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="services"></param>
        protected BaseContentEndPointMethodHandler(EndPointMethodConfiguration configuration, EndPointServices services)
        {
            Configuration = configuration;
            Services = services;
            HttpMethod = configuration.RouteInformation.Method;
        }

        /// <inheritdoc />
        public EndPointServices Services { get; }

        /// <inheritdoc />
        public IRpcRouteInformation RouteInformation => Configuration.RouteInformation;

        /// <inheritdoc />
        public virtual IEndPointMethodConfigurationReadOnly Configuration { get; }

        /// <inheritdoc />
        public string HttpMethod {get; }

        /// <inheritdoc />
        public abstract Task HandleRequest(HttpContext context);

       /// <summary>
        /// Builds method delegates
        /// </summary>
        protected virtual void SetupMethod()
        {
            lock (this)
            {
                if (ActivationFunc == null)
                {
                    AssignActivationFunc();

                    BindParametersDelegate =
                        Services.ParameterBinderDelegateBuilder.CreateParameterBindingMethod(Configuration, out var parametersType);

                    if (Configuration.InvokeInformation.MethodInvokeDelegate == null)
                    {
                        InvokeMethodDelegate =
                            Services.MethodInvokerCreationService.BuildMethodInvoker<TReturn>(Configuration, parametersType);
                    }
                    else
                    {
                        InvokeMethodDelegate =
                            (InvokeMethodDelegate<TReturn>)(object)Configuration.InvokeInformation.MethodInvokeDelegate;
                    }

                    ResponseDelegate = Services.ResponseDelegateCreator.CreateResponseDelegate(Configuration);
                }
            }
        }

       private void AssignActivationFunc()
       {
           var requestExecutionContextFeature = Services.ConfigurationManager
               .GetConfiguration<RequestExecutionContextFeatureConfiguration>().FeatureEnabled;

           if (requestExecutionContextFeature)
           {
               var activationFunc = Configuration.ActivationFunc;

                ActivationFunc = context =>
               {
                   context.HttpContext.Features.Set<IRequestExecutionContextFeature>(new RequestExecutionContextFeature(context));

                   return activationFunc(context);
               };
           }
           else
           {
               ActivationFunc = Configuration.ActivationFunc;
           }
       }
    }
}


text:
/* ###
 * IP: GHIDRA
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ghidra.pcodeCPort.slghsymbol;

import java.io.PrintStream;
import java.util.Iterator;
import java.util.List;

import org.jdom.Element;

import generic.stl.VectorSTL;
import ghidra.pcodeCPort.sleighbase.SleighBase;
import ghidra.pcodeCPort.slghpatexpress.PatternExpression;
import ghidra.pcodeCPort.slghpatexpress.PatternValue;
import ghidra.pcodeCPort.utils.XmlUtils;
import ghidra.sleigh.grammar.Location;

public class ValueMapSymbol extends ValueSymbol {
	private VectorSTL<Long> valuetable = new VectorSTL<Long>();
	private boolean tableisfilled;

	public ValueMapSymbol(Location location) {
		super(location);
	}

	public ValueMapSymbol(Location location, String nm, PatternValue pv, VectorSTL<Long> vt) {
		super(location, nm, pv);
		valuetable = new VectorSTL<Long>(vt);
		checkTableFill();
	}

	@Override
	public symbol_type getType() {
		return symbol_type.valuemap_symbol;
	}

	private void checkTableFill() {
		// Check if all possible entries in the table have been filled
		long min = patval.minValue();
		long max = patval.maxValue();
		tableisfilled = (min >= 0) && (max < valuetable.size());
		for (int i = 0; i < valuetable.size(); ++i) {
			if (valuetable.get(i) == 0xBADBEEF) {
				tableisfilled = false;
			}
		}
	}

	@Override
	public void saveXml(PrintStream s) {
		s.append("<valuemap_sym");
		saveSleighSymbolXmlHeader(s);
		s.append(">\n");
		patval.saveXml(s);
		for (int i = 0; i < valuetable.size(); ++i) {
			s.append("<valuetab val=\"").append(Long.toString(valuetable.get(i))).append("\"/>\n");
		}
		s.append("</valuemap_sym>\n");
	}

	@Override
	public void saveXmlHeader(PrintStream s) {
		s.append("<valuemap_sym_head");
		saveSleighSymbolXmlHeader(s);
		s.append("/>\n");
	}

	@Override
	public void restoreXml(Element el, SleighBase trans) {
		List<?> list = el.getChildren();
		Iterator<?> iter = list.iterator();
		Element element = (Element) iter.next();
		patval = (PatternValue) PatternExpression.restoreExpression(element, trans);
		patval.layClaim();
		while (iter.hasNext()) {
			Element child = (Element) iter.next();
			long value = XmlUtils.decodeUnknownLong(child.getAttributeValue("val"));
			valuetable.push_back(value);
		}
		checkTableFill();

	}

}


text:
namespace photon{

struct photon_player{
    glm::vec2 location = glm::vec2(0.0f);

    std::map<block_type, int8_t> items;
    block_type current_item = invalid_block;

    bool snap_to_beam = true;
};

namespace player{

glm::vec2 SnapToBeam(photon_laserbeam &beam, glm::vec2 location);
glm::vec2 SnapToBeams(std::vector<photon_laserbeam> &beams, glm::vec2 location);

int8_t AddItem(photon_player &player, block_type type, int8_t amount = 1);
int8_t AddItemCurrent(photon_player &player, int8_t amount = 1);
int8_t GetItemCount(photon_player &player, block_type type);
int8_t GetItemCountCurrent(photon_player &player);
block_type CurrentItem(photon_player &player);
block_type NextItem(photon_player &player);
block_type PreviousItem(photon_player &player);

void GiveInfiniteItems(photon_player &player, block_type type);
}

}

#endif


text:
require 'spec_helper'

RSpec::Matchers.define :be_allowed do
  match do |response|
    response.status.should == 200
    response.body.should == "success"
  end
end

RSpec::Matchers.define :be_unauthorized do
  match do |response|
    response.status.should == 401
  end
end

describe "Requests using Rack::HeaderKey" do
  let(:key) { "sekret" }
  let(:app) {
    Rack::Builder.new do
      use Rack::HeaderKey, :key => "sekret", :path => "/api"
      run lambda { |env| [200, {'Content-Type' => "text/plain"}, ["success"]]}
    end
  }

  it "raise an argument error if the initialization path option doesn't start with /" do
    app = Rack::Builder.new do
      use Rack::HeaderKey, :key => "sekret", :path => "bad_path"
      run lambda { |env| [200, {'Content-Type' => "text/plain"}, ["success"]]}
    end

    lambda {
      Rack::MockRequest.new(app).get('/test')
    }.should raise_error(ArgumentError)
  end

  context "for the protected path" do
    it "are allowed if the proper key is present in X_AUTHORIZATION_KEY" do
      response = Rack::MockRequest.new(app).get('/api/test', "X_AUTHORIZATION_KEY" => key)
      response.should be_allowed
    end

    it "are allowed if the proper key is present in HTTP_X_AUTHORIZATION_KEY" do
      response = Rack::MockRequest.new(app).get('/api/test', "HTTP_X_AUTHORIZATION_KEY" => key)
      response.should be_allowed
    end

    it "are unauthorized if the proper key is not in X_AUTHORIZATION_KEY" do
      response = Rack::MockRequest.new(app).get('/api/test', "X_AUTHORIZATION_KEY" => "bogus_key")
      response.should be_unauthorized
    end
  end

  context "for an unprotected path" do
    it "are allowed when no key is given" do
      response = Rack::MockRequest.new(app).get('/test')
      response.should be_allowed
    end

    it "are allowed even if an improper key is given" do
      response = Rack::MockRequest.new(app).get('/test', "X_AUTHORIZATION_KEY" => "bogus_key")
      response.should be_allowed
    end
  end

  context "when no path is given" do
    it "the root path is protected" do
      app = Rack::Builder.new do
        use Rack::HeaderKey, :key => "sekret"
        run lambda { |env| [200, {'Content-Type' => "text/plain"}, ["success"]]}
      end
      response = Rack::MockRequest.new(app).get('/test', "X_AUTHORIZATION_KEY" => "bogus_key")
      response.should be_unauthorized
    end
  end
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Crypto
</TITLE>

<META NAME="date" CONTENT="2010-09-01">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.rambris

Class Crypto

java.lang.Object
  com.rambris.Crypto

public class Crypto
extends java.lang.Object

Crypto functions are stored here

Version:

1.0

Author:

Fredrik Rambris <fredrik@rambris.com>

Constructor Summary

Crypto()

Method Summary

static int
chartonum(java.lang.String str)

 java.lang.String
GetGUID()

          Generate a 128-bit random number in hex notation

 java.lang.String
hash(java.lang.String str)

          Generate SHA-1 hash for string

 int
luhn(java.lang.String indata)

          Mod10 check.

 java.lang.String
md5hash(java.lang.String str)

          Generate MD5 hash for string

 java.lang.String
md5hashbase64(java.lang.String str)

static java.lang.String
numtochar(int number)

 java.lang.String
sha1hashbase64(java.lang.String str)

static java.lang.String
toHex(byte[] bytes)

          Convert binary data to hexadecimal notation

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Crypto

public Crypto()

Method Detail

GetGUID

public java.lang.String GetGUID()

Generate a 128-bit random number in hex notation

Returns:
generated number

hash

public java.lang.String hash(java.lang.String str)

Generate SHA-1 hash for string

Parameters:
str - Input string

Returns:
Generated hash

md5hash

public java.lang.String md5hash(java.lang.String str)

Generate MD5 hash for string

Parameters:
str - Input string

Returns:
Generated hash

md5hashbase64

public java.lang.String md5hashbase64(java.lang.String str)

sha1hashbase64

public java.lang.String sha1hashbase64(java.lang.String str)

toHex

public static java.lang.String toHex(byte[] bytes)

Convert binary data to hexadecimal notation

Parameters:
bytes -

Returns:

numtochar

public static java.lang.String numtochar(int number)

chartonum

public static int chartonum(java.lang.String str)

luhn

public int luhn(java.lang.String indata)

Mod10 check. Source from http://sv.wikipedia.org/wiki/Luhn-algoritmen

Parameters:
indata -

Returns:

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
SigningStream
</TITLE>

<META NAME="date" CONTENT="2008-08-14">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.keyczar.interfaces

Interface SigningStream

All Superinterfaces:
Stream

public interface SigningStream
extends Stream

Signing streams are able to sign data

Author:

steveweis@gmail.com (Steve Weis)

Method Summary

 int
digestSize()

          Return the size of the signature or digest in number of bytes.

 void
initSign()

          Initializes this stream for signing.

 void
sign(java.nio.ByteBuffer output)

          Sign the updated input and output the signature in the given buffer.

 void
updateSign(java.nio.ByteBuffer input)

          Update the signature with the given input.

Method Detail

initSign

void initSign()
              throws KeyczarException

Initializes this stream for signing.

Throws:

KeyczarException - If any Java JCE errors occur

updateSign

void updateSign(java.nio.ByteBuffer input)
                throws KeyczarException

Update the signature with the given input.

Parameters:
input - The input to sign.

Throws:

KeyczarException - If any Java JCE errors occur

sign

void sign(java.nio.ByteBuffer output)
          throws KeyczarException

Sign the updated input and output the signature in the given buffer.

Parameters:
output - The output where the signature will be written.

Throws:

KeyczarException - If any Java JCE errors occur or the output buffer
                          is too small.

digestSize

int digestSize()

Return the size of the signature or digest in number of bytes.

Returns:
size of signature in bytes

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
package e2e_node

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/kubernetes/pkg/api/v1"
	"k8s.io/kubernetes/pkg/kubelet/dockertools"
	"k8s.io/kubernetes/test/e2e/framework"

	"github.com/davecgh/go-spew/spew"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = framework.KubeDescribe("ImageID", func() {

	busyBoxImage := "gcr.io/google_containers/busybox@sha256:4bdd623e848417d96127e16037743f0cd8b528c026e9175e22a84f639eca58ff"

	f := framework.NewDefaultFramework("image-id-test")

	It("should be set to the manifest digest (from RepoDigests) when available", func() {
		podDesc := &v1.Pod{
			ObjectMeta: metav1.ObjectMeta{
				Name: "pod-with-repodigest",
			},
			Spec: v1.PodSpec{
				Containers: []v1.Container{{
					Name:    "test",
					Image:   busyBoxImage,
					Command: []string{"sh"},
				}},
				RestartPolicy: v1.RestartPolicyNever,
			},
		}

		pod := f.PodClient().Create(podDesc)

		framework.ExpectNoError(framework.WaitTimeoutForPodNoLongerRunningInNamespace(
			f.ClientSet, pod.Name, f.Namespace.Name, framework.PodStartTimeout))
		runningPod, err := f.PodClient().Get(pod.Name, metav1.GetOptions{})
		framework.ExpectNoError(err)

		status := runningPod.Status

		if len(status.ContainerStatuses) == 0 {
			framework.Failf("Unexpected pod status; %s", spew.Sdump(status))
			return
		}

		Expect(status.ContainerStatuses[0].ImageID).To(Equal(dockertools.DockerPullablePrefix + busyBoxImage))
	})
})


text:
lily_library *lily_library_load(const char *path)
{
    HMODULE handle = LoadLibraryA(path);
    if (handle == NULL)
        return NULL;

    const void *dynaload_table = GetProcAddress(handle, "lily_dynaload_table");
    if (dynaload_table == NULL) {
        FreeLibrary(handle);
        return NULL;
    }

    lily_library *lib = lily_malloc(sizeof(*lib));
    lib->source = handle;
    lib->dynaload_table = (const char **)dynaload_table;
    return lib;
}

void *lily_library_get(void *source, const char *target)
{
    return GetProcAddress((HMODULE)source, target);
}

void lily_library_free(void *source)
{
    FreeLibrary((HMODULE)source);
}
#else
#include <dlfcn.h>

lily_library *lily_library_load(const char *path)
{
    void *handle = dlopen(path, RTLD_LAZY);
    if (handle == NULL)
        return NULL;

    const void *dynaload_table = dlsym(handle, "lily_dynaload_table");
    if (dynaload_table == NULL) {
        dlclose(handle);
        return NULL;
    }

    lily_library *lib = lily_malloc(sizeof(lily_library));
    lib->source = handle;
    lib->dynaload_table = (const char **)dynaload_table;

    return lib;
}

void *lily_library_get(void *source, const char *name)
{
    return dlsym(source, name);
}

void lily_library_free(void *source)
{
    dlclose(source);
}
#endif


text:
pub trait Vehicle {
    type Color;

    fn go(&self) {  }
}

pub trait Car : Vehicle {
    fn honk(&self) { }
    fn chip_paint(&self, c: Self::Color) { }
}

///////////////////////////////////////////////////////////////////////////

struct Black;
struct ModelT;
impl Vehicle for ModelT { type Color = Black; }
impl Car for ModelT { }

///////////////////////////////////////////////////////////////////////////

struct Blue;
struct ModelU;
impl Vehicle for ModelU { type Color = Blue; }
impl Car for ModelU { }

///////////////////////////////////////////////////////////////////////////

fn dent<C:Car>(c: C, color: C::Color) { c.chip_paint(color) }
fn a() { dent(ModelT, Black); }
fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types
fn c() { dent(ModelU, Black); } //~ ERROR mismatched types
fn d() { dent(ModelU, Blue); }

///////////////////////////////////////////////////////////////////////////

fn e() { ModelT.chip_paint(Black); }
fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types
fn g() { ModelU.chip_paint(Black); } //~ ERROR mismatched types
fn h() { ModelU.chip_paint(Blue); }

pub fn main() { }


text:
let config = require('../config');
import Env from './env'

export default {
  apiUrl: Env.apiUrl,
  token: Env.apiKey,
  gaTrackingID: Env.googleAnalyticsTrackingID,

  get(key) {
    return this[key];
  }
}


text:
/* @override http://whatever.local/~carlos/hagreve/hojehatransportes/static/markdown.css */

html { font-size: 62.5%; }
html, body { height: 100%; }

body {
	font-family: Helvetica, Arial, sans-serif;
	font-size: 150%;
	line-height: 1.3;
	width: 700px;
	margin: auto;
	position: relative;
	padding: 0 30px;
}

p,ul,ol,dl,table,pre { margin-bottom: 1em; }
ul { margin-left: 20px; }
a { text-decoration: none; cursor: pointer; color: #ba832c; font-weight: bold; }
a:focus { outline: 1px dotted; }
a:visited {  }
a:hover, a:focus { color: #d3a459; text-decoration: none; }
a *, button * { cursor: pointer; }
hr { display: none; }
small { font-size: 90%; }
input, select, button, textarea, option { font-family: Arial, "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif; font-size: 100%; }
button, label, select, option, input[type=submit] { cursor: pointer; }
.group:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .group {display: inline-block;}
/* Hides from IE-mac \*/ * html .group {height: 1%;} .group {display: block;} /* End hide from IE-mac */
sup { font-size: 80%; line-height: 1; vertical-align: super; }
button::-moz-focus-inner { border: 0; padding: 1px; }
span.amp { font-family: Baskerville, "Goudy Old Style", "Palatino", "Book Antiqua", serif; font-weight: normal; font-style: italic; font-size: 1.2em; line-height: 0.8; }

h1,h2,h3,h4,h5,h6 {
    line-height: 1.1;
    font-family: Baskerville, "Goudy Old Style", "Palatino", "Book Antiqua", serif;
}

h2 { font-size: 22pt; border-top: 3px solid silver; padding-top: 20px;}
h3 { font-size: 20pt; }
h4 { font-size: 18pt; }
h5 { font-size: 16pt; }
h6 { font-size: 14pt; }

code,pre {
	font-family: "Courier New", Courier, mono;
	background-color: #f5f5f5;
	font-size: 90%;
	border: 1px solid #e6e6e6;
	border-radius: 4px;
	padding:0 2px;
}

h1 {
	font-size: 400%;
	margin: 0 0 0.1em;
	font-family: Baskerville, "Goudy Old Style", "Palatino", "Book Antiqua", serif;
}

h1 a,
h1 a:hover {
	color: #d7af72;
	font-weight: normal;
	text-decoration: none;
}

pre {
	background: rgba(202,202,202,0.5);
	padding: 8px 10px;
	border-radius: 0.4em;
	-moz-border-radius: 0.4em;
	-webkit-border-radius: 0.4em;
	overflow-x: hidden;
}

pre code {
	font-size: 10pt;
}

.thumb {
    float:left;
    margin: 10px;
}

ul {
	padding-left: 5px;
}

ul li {
	margin-bottom: 5px;
}

#fotter {
	padding: 30px 0;
	text-align: center;
	color: grey;
	width: auto;
	margin: auto;
	border-top: 2px solid silver;
}

#fotter a {
	color: grey;
}


text:
/*
 * Do not modify this file. This file is generated from the elasticloadbalancing-2012-06-01.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

namespace Amazon.ElasticLoadBalancing.Model
{
    ///
    /// Container for the parameters to the SetLoadBalancerPoliciesForBackendServer operation.
    /// Replaces the current set of policies associated with a port on which the back-end
    /// server is listening with a new set of policies. After the policies have been created
    /// using CreateLoadBalancerPolicy, they can be applied here as a list. At this
    /// time, only the back-end server authentication policy type can be applied to the back-end
    /// ports; this policy type is composed of multiple public key policies.
    ///
    ///  <note>
    /// <para>
    /// The SetLoadBalancerPoliciesForBackendServer replaces the current set of policies
    /// associated with the specified instance port. Every time you use this action to enable
    /// the policies, use the PolicyNames parameter to list all the policies
    /// you want to enable.
    /// </para>
    ///  </note>
    /// <para>
    /// You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies action
    /// to verify that the policy has been associated with the back-end server.
    /// </para>
    ///
    public partial class SetLoadBalancerPoliciesForBackendServerRequest : AmazonElasticLoadBalancingRequest
    {
        private int? _instancePort;
        private string _loadBalancerName;
        private List<string> _policyNames = new List<string>();

        ///
        /// Gets and sets the property InstancePort.
        /// <para>
        ///  The port number associated with the back-end server.
        /// </para>
        ///
        public int InstancePort
        {
            get { return this._instancePort.GetValueOrDefault(); }
            set { this._instancePort = value; }
        }

        // Check to see if InstancePort property is set
        internal bool IsSetInstancePort()
        {
            return this._instancePort.HasValue;
        }

        ///
        /// Gets and sets the property LoadBalancerName.
        /// <para>
        ///  The mnemonic name associated with the load balancer. This name must be unique within
        /// the set of your load balancers.
        /// </para>
        ///
        public string LoadBalancerName
        {
            get { return this._loadBalancerName; }
            set { this._loadBalancerName = value; }
        }

        // Check to see if LoadBalancerName property is set
        internal bool IsSetLoadBalancerName()
        {
            return this._loadBalancerName != null;
        }

        ///
        /// Gets and sets the property PolicyNames.
        /// <para>
        ///  List of policy names to be set. If the list is empty, then all current polices are
        /// removed from the back-end server.
        /// </para>
        ///
        public List<string> PolicyNames
        {
            get { return this._policyNames; }
            set { this._policyNames = value; }
        }

        // Check to see if PolicyNames property is set
        internal bool IsSetPolicyNames()
        {
            return this._policyNames != null && this._policyNames.Count > 0;
        }

    }
}


text:
import { Emitter } from './Emitter';

/**
 * A subset of the Listener interface used only for
 * comparing two Listener objects.
 * @see Listener
 * @see matchListener()
 */
export interface MatchingListener {
    /** @see Listener.eventName */
    eventName?: string;
    /** @see Listener.matchCallback */
    matchCallback?: Function;
    /** @see Listener.matchContext */
    matchContext?: any;
    /** @see Listener.hearer */
    hearer?: Emitter;
}